[no-issue] docs: complete per-code catalog organized by family (EN+PT)#15
Conversation
Rework every catalog page so each emitted code has its own explained entry (what it covers, J1-J6, severity, BAD/CLEAN gist), grouped by family, with a compact index table at the top linking to each entry. No code is left as a bare table row. Completeness fixes (the catalog had drifted behind the scanners): - Python: add C56, C57, C59 + a Project-layer (PL1/PL2/PL7/PL8) section; full scanner.py set. - JS/TS: promote the 17 shared C-codes to full entries; add PL7/PL8/PL10 + D7/D8. - Robot: promote shared C-codes; add the previously-undocumented C6 and C31; add PL9. - Semantic: add S17, S18, S21 (now S1-S18 + S21, matching reference.md). - Shared-id honesty notes: C31 (Robot captured-value vs Python capsys) and C44 (numeric tautology vs the wider Robot bucket), cross-linked. - index.md rewritten to describe the per-code, family-grouped structure. EN and PT in lockstep. mkdocs build --strict passes (explicit heading anchors added). Co-authored-by: homesellerq-coder <294912019+homesellerq-coder@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74e2d36010
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| | [C4b](#c4b) | LOW | J1 | test class has `__init__` (not collected) | | ||
| | [C5](#c5) | HIGH | J2 | always-true check (`assert True` / tuple / `or True`) | | ||
| | [C6](#c6) | LOW | J4 | weak check (only that something came back) | | ||
| | [C6b](#c6b) | LOW | J5 | coupled to positional argument layout | |
There was a problem hiding this comment.
Synchronize index judgments with entries
This new index row disagrees with the per-code entry below: C6b is listed as J5 here, while its entry says J3 at docs/catalog/python.md:295. The same index-vs-entry drift appears for C13, C16, C25, C35-C37, plus JS3/JS29 and Robot R6, so the quick index now gives users contradictory confidence/judgment metadata for the same emitted codes.
Useful? React with 👍 / 👎.
| A hard-coded IP-address URL in test data: environment coupling / mystery guest. Read it from a | ||
| variable or resource. | ||
|
|
||
| ### C31 - captured value never used { #c31 } |
There was a problem hiding this comment.
Remove or reconcile unimplemented Robot C31
Adding C31 as a normal Robot catalog entry contradicts the scanner page, which still lists C31 - captured value never used under “Deliberately not implemented” at docs/scanners/robot.md:88-93. Because this catalog states it contains codes implemented/emitted by robotframework-falsegreen, users will expect a LOW C31 finding that the documented scanner coverage explicitly says is deferred; either remove the entry or update the scanner coverage if it really shipped.
Useful? React with 👍 / 👎.
| async def fetch(): ... | ||
|
|
||
| def test_fetch(): | ||
| assert fetch() == {"ok": True} # C56 - asserts the coroutine, not its result |
There was a problem hiding this comment.
In this BAD example, Python compares the coroutine object returned by fetch() to a dict, so the assertion evaluates false and the test fails instead of passing green; only a truthiness shape such as a bare coroutine assertion would demonstrate the described false-green. As written, the catalog documents C56 with a false-red example and makes the scanner appear to flag a test that already fails.
Useful? React with 👍 / 👎.
| ```python | ||
| def test_role(): | ||
| m = Mock() | ||
| assert user.role == m.role # C57 - m.role is an auto-created Mock |
There was a problem hiding this comment.
In this BAD example, comparing an ordinary user.role value with a fresh Mock child does not pass green: Mock equality with a non-identical value returns False, and the truthiness of m.role is not used by ==. Unless the SUT is explicitly set up to return that exact mock child, this documents C57 with a failing test rather than a false-green.
Useful? React with 👍 / 👎.
| | [C56](#c56) | LOW | J1 | sync assert of a never-awaited coroutine | | ||
| | [C57](#c57) | LOW | J3 | compares against an unconfigured Mock attribute | | ||
| | [C59](#c59) | HIGH | J1 | bare top-level comparison statement (loose-statement sibling of C39) | |
There was a problem hiding this comment.
Update the family coverage matrix for new codes
This commit adds C56, C57, and C59 as emitted Python codes, but docs/concepts/coverage.md still describes itself as the public-code view and omits them from the F2/F4/F1 rows; it also omits the newly added semantic S17, S18, and S21. Readers moving from the catalog to the coverage-by-family page now get a stale shipped-code matrix, so update that table alongside the new catalog entries.
Useful? React with 👍 / 👎.
Every emitted code now has its own explained entry (what it covers, J-code, severity, BAD/CLEAN), grouped by family, with a per-page index table. Completeness fixes: Python C56/C57/C59 + PL section; JS shared C-codes promoted + PL7/8/10 + D7/8; Robot C6/C31 + PL9; Semantic S17/S18/S21 (now S1-S18+S21). Shared-id notes (C31, C44) cross-linked. index.md rewritten. EN/PT lockstep, mkdocs --strict passes.