Skip to content

Commit f965611

Browse files
committed
docs(go): US English in the Go docstrings and tests
Prose only, on lines this branch adds. The Python/TypeScript/Java docstrings keep their existing spellings -- not a mandate to rewrite them.
1 parent 6779580 commit f965611

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎cldk/analysis/go/backend.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ def get_degraded(self) -> List[GoDegraded]:
475475
**Read this before trusting an absence.** A non-empty list means some L4 step fell back to
476476
a coarser result (``range_func``, ``unmapped_ssa``, ``no_vta``, …), so a path that *is*
477477
returned is still a real may-flow, but "no path" is not a proof over the affected packages
478-
and callables. :meth:`taint` reports this on its own ledger rather than making the judgement
478+
and callables. :meth:`taint` reports this on its own ledger rather than making the judgment
479479
for the caller; this accessor is how a caller inspects it directly.
480480
"""
481481

@@ -521,7 +521,7 @@ def taint(
521521
``unresolved``.
522522
523523
**Sources, sinks and sanitizers are the caller's to supply.** This SDK ships no Go framework
524-
catalogue and derives no default set: a per-language vocabulary of taint sources is policy
524+
catalog and derives no default set: a per-language vocabulary of taint sources is policy
525525
that rots, and this accessor is the mechanism.
526526
527527
**A sanitizer is two mechanisms wearing one word**, told apart by shape. A bare ``str`` cuts

‎cldk/analysis/go/codeanalyzer/codeanalyzer.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ def _require_dataflow(self) -> None:
427427
428428
One guard for the per-callable graphs and the slices: they come from the same analyzer pass
429429
and go dark together. It **raises** rather than returning empty because at a shallower level
430-
an empty answer would mean "not analysed" while looking exactly like "no dependence" (D7).
430+
an empty answer would mean "not analyzed" while looking exactly like "no dependence" (D7).
431431
"""
432432
if self._level < self._DATAFLOW_LEVEL:
433433
raise CodeanalyzerUsageException(

‎cldk/analysis/go/go_analysis.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def taint(
257257
m sources against n sinks in one traversal, reporting per pair: the witnesses in ``paths``,
258258
the pairs an absence claim can be built on in ``exhausted``, and everything else in
259259
``unresolved``. The source/sink/sanitizer vocabulary is the caller's — no Go framework
260-
catalogue ships. A non-empty :meth:`get_degraded` voids every ``exhausted`` certification,
260+
catalog ships. A non-empty :meth:`get_degraded` voids every ``exhausted`` certification,
261261
because absence of a path is not a proof over an approximated graph.
262262
"""
263263
return self.backend.taint(sources, sinks, sanitizers, depth=depth, max_paths=max_paths)

‎cldk/analysis/go/neo4j/neo4j_backend.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def _slice_node(row: Dict[str, Any], module_key: Callable[[str], str]) -> SliceN
102102
103103
The local twin is ``GoCodeanalyzer._slice_node``; the two share
104104
:func:`~cldk.analysis.commons.resolve.body_node_kind`, so a vertex a caller addressed through
105-
``resolve_value`` as a ``global`` comes back from a slice labelled a ``global`` on either
105+
``resolve_value`` as a ``global`` comes back from a slice labeled a ``global`` on either
106106
backend, and they differ only in where the fields are read from.
107107
108108
``row["var"]`` is the graph's name for the JSON's ``of`` (see
@@ -480,7 +480,7 @@ def get_source(self, node_id: str) -> str:
480480
# the value a vertex stands for arrives under the name the shared helpers expect.
481481
#
482482
# A STAND-IN IS A FIRST-CLASS VERTEX. ``:GoExternal`` nodes carry ``GO_HAS_BODY_NODE`` body
483-
# nodes at L4, so the traversals must not be labelled ``:GoCallable``-only on the interior or
483+
# nodes at L4, so the traversals must not be labeled ``:GoCallable``-only on the interior or
484484
# a flow *through* ``database/sql.DB.Query`` would be invisible — which is the very flow the
485485
# httpsql fixture gates. ``:GoCallable|GoExternal`` is therefore deliberate everywhere below.
486486
# =====================================================================================

‎tests/analysis/go/test_go_dataflow.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
gated analyzer-side by ``TestGateL4_HTTPToSQLPath``; ``four_type_kinds.json`` is one declaration of
66
each ``GoType.kind`` at ``-a 1``.
77
8-
**What is asserted and what is not.** These tests pin *behaviour a caller depends on* — that the
8+
**What is asserted and what is not.** These tests pin *behavior a caller depends on* — that the
99
gated flow is found, that the four Go id/name traps are handled, that a refutation is only made
1010
where one is warranted. They deliberately do not pin edge counts: those move with every analyzer
1111
release and a test that fails on an improvement teaches nothing. Where a count appears it is
@@ -329,7 +329,7 @@ def test_paging_is_a_prefix_of_one_total_order(httpsql):
329329

330330
def test_a_shallow_analysis_refuses_rather_than_answering_empty(tmp_path, monkeypatch):
331331
"""At a level below the dataflow pass the three lists are absent, and an empty page there would
332-
mean "not analysed" while looking exactly like "no dependence" (D7). So it raises, naming the
332+
mean "not analyzed" while looking exactly like "no dependence" (D7). So it raises, naming the
333333
level to rebuild at."""
334334
shallow = _facade(tmp_path, monkeypatch, FOUR_KINDS, app="kinds", level=AnalysisLevel.symbol_table)
335335
with pytest.raises(CodeanalyzerUsageException, match="level 3"):

0 commit comments

Comments
 (0)