You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The source linter forbids ===/---- separators in src/ and Python comments, but the toolchain's own Python uses runtime-generated and Unicode separators that the linter cannot see.
Why the linter misses them:check_junk_comments matches ===|-{4,} against #-comment lines.
print("=" * 70) is a string-multiply expression; the source text contains a single = inside a string literal, so the === pattern never matches — the banner only exists at runtime.
The # ── Variable ── comments use U+2500 box-drawing chars, not ASCII -, so -{4,} never matches.
Also found by grep (same class, broader scope):"=" * N print banners in toolchain/mfc/params_tests/{coverage,inventory,snapshot,runner}.py and "-" * len(...) in toolchain/main.py. Mentioned so a fixer can decide whether to sweep all of them.
Fix: remove the banner print("=" * 70) calls (keep the message lines) and delete the # ── ... ── decorator comments. Output-neutral (toolchain stdout/docs cosmetics only).
Optional follow-on: extend check_junk_comments to also flag "=" * <int> / "-" * <int> with large N and U+2500 runs, so this rule self-enforces in the toolchain too.
Filed from a repo-wide code-cleanliness review; verified against master @ 40dde5e.
The source linter forbids
===/----separators insrc/and Python comments, but the toolchain's own Python uses runtime-generated and Unicode separators that the linter cannot see.Confirmed locations:
toolchain/mfc/gen_case_constraints_docs.py:78—print("=" * 70, file=sys.stderr)toolchain/mfc/gen_case_constraints_docs.py:85—print("=" * 70, file=sys.stderr)toolchain/mfc/viz/interactive.py— 9 box-drawing banner comments using──(lines 1122, 1133, 1175, 1187, 1208, 1261, 1279, 1321, 1418), e.g.:# ── Variable ──────────────────────────────────────────────────Why the linter misses them:
check_junk_commentsmatches===|-{4,}against#-comment lines.print("=" * 70)is a string-multiply expression; the source text contains a single=inside a string literal, so the===pattern never matches — the banner only exists at runtime.# ── Variable ──comments use U+2500 box-drawing chars, not ASCII-, so-{4,}never matches.Also found by grep (same class, broader scope):
"=" * Nprint banners intoolchain/mfc/params_tests/{coverage,inventory,snapshot,runner}.pyand"-" * len(...)intoolchain/main.py. Mentioned so a fixer can decide whether to sweep all of them.Fix: remove the banner
print("=" * 70)calls (keep the message lines) and delete the# ── ... ──decorator comments. Output-neutral (toolchain stdout/docs cosmetics only).Optional follow-on: extend
check_junk_commentsto also flag"=" * <int>/"-" * <int>with large N and U+2500 runs, so this rule self-enforces in the toolchain too.Filed from a repo-wide code-cleanliness review; verified against
master@40dde5e.Code references
toolchain/mfc/gen_case_constraints_docs.py:78— print('=' * 70)toolchain/mfc/gen_case_constraints_docs.py:85— print('=' * 70)toolchain/mfc/viz/interactive.py:1122— box-drawing separator comment