Skip to content

Introduce SSOT spec pipeline with ANTLR AST parser, conformance corpu… - #29

Closed
tboy1337 wants to merge 24 commits into
mainfrom
SST
Closed

Introduce SSOT spec pipeline with ANTLR AST parser, conformance corpu…#29
tboy1337 wants to merge 24 commits into
mainfrom
SST

Conversation

@tboy1337

Copy link
Copy Markdown
Owner

…s, and 175-rule registry. Replace regex-first checkers with a YAML-driven single source of truth under spec/ (rules, commands, expansion, ANTLR grammar) and code generation for the rule registry, patterns, grammar rules, and parser visitors; retain checkers/ as backward-compatible aliases wired through the unified AST-first visitor pipeline. Add spec conformance fixtures with expect.json oracles and cmd_oracle.py, audit and validation tooling under scripts/spec/, and CI updates; remove legacy corpus baseline scripts. Expand built-in rules through E041 and W062 (175 total), add Batch Language Reference documentation, and update architecture and requirements docs to describe the new SSOT workflow.

…s, and 175-rule registry. Replace regex-first checkers with a YAML-driven single source of truth under spec/ (rules, commands, expansion, ANTLR grammar) and code generation for the rule registry, patterns, grammar rules, and parser visitors; retain checkers/ as backward-compatible aliases wired through the unified AST-first visitor pipeline. Add spec conformance fixtures with expect.json oracles and cmd_oracle.py, audit and validation tooling under scripts/spec/, and CI updates; remove legacy corpus baseline scripts. Expand built-in rules through E041 and W062 (175 total), add Batch Language Reference documentation, and update architecture and requirements docs to describe the new SSOT workflow.
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 529 files, which is 429 over the limit of 100.

To get a review, narrow the scope:
• coderabbit review --committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

Usage-priced reviews support at most 300 files.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: df9a1237-57d9-434e-a4e1-7068a1ddec20

📥 Commits

Reviewing files that changed from the base of the PR and between dfc0840 and 4d08daa.

⛔ Files ignored due to path filters (11)
  • spec/batch-spec.lock is excluded by !**/*.lock
  • spec/corpus/syntax/w048-for-f-csv/data.csv is excluded by !**/*.csv
  • src/blinter/generated/.grammar-stamp is excluded by !**/generated/**
  • src/blinter/generated/BatchLexer.interp is excluded by !**/generated/**
  • src/blinter/generated/BatchLexer.py is excluded by !**/generated/**
  • src/blinter/generated/BatchLexer.tokens is excluded by !**/generated/**
  • src/blinter/generated/BatchParser.interp is excluded by !**/generated/**
  • src/blinter/generated/BatchParser.py is excluded by !**/generated/**
  • src/blinter/generated/BatchParser.tokens is excluded by !**/generated/**
  • src/blinter/generated/BatchParserVisitor.py is excluded by !**/generated/**
  • src/blinter/generated/__init__.py is excluded by !**/generated/**
📒 Files selected for processing (534)
  • .coveragerc
  • .gitattributes
  • .github/workflows/Build-Release-PYPI.yml
  • .github/workflows/test.yml
  • .gitignore
  • .gitmodules
  • Blinter.spec
  • README.md
  • docs/Architecture.md
  • docs/Batch-File-Linter-Requirements.md
  • docs/Batch-Language-Reference.md
  • funding.json
  • mypy.ini
  • pylintrc
  • pyproject.toml
  • pytest.ini
  • requirements-dev.txt
  • requirements.txt
  • scripts/TestExeSmoke.Helpers.ps1
  • scripts/benchmark_lint.py
  • scripts/conformance/lint_corpus.py
  • scripts/corpus_baseline.py
  • scripts/corpus_lint.py
  • scripts/generate_corpus_baseline.py
  • scripts/generate_file_version_info.py
  • scripts/run_powershell_checks.ps1
  • scripts/spec/__init__.py
  • scripts/spec/_paths.py
  • scripts/spec/audit_ssot.py
  • scripts/spec/cmd_oracle.py
  • scripts/spec/generate_commands.py
  • scripts/spec/generate_docs.py
  • scripts/spec/generate_expansion.py
  • scripts/spec/generate_grammar_rules.py
  • scripts/spec/generate_parser.py
  • scripts/spec/generate_rules.py
  • scripts/spec/patterns_static_fragment.py
  • scripts/spec/seed_corpus_cases.py
  • scripts/spec/validate_corpus.py
  • scripts/spec/validate_spec.py
  • scripts/verify.py
  • spec/README.md
  • spec/audit/baseline-latest.md
  • spec/audit/reference-matrix.yaml
  • spec/corpus/integration/call-subroutine-e012/expect.json
  • spec/corpus/integration/call-subroutine-e012/input.cmd
  • spec/corpus/integration/delayed-expansion-no-p026/expect.json
  • spec/corpus/integration/delayed-expansion-no-p026/input.cmd
  • spec/corpus/integration/e008-unreachable-after-exit/expect.json
  • spec/corpus/integration/e008-unreachable-after-exit/input.cmd
  • spec/corpus/integration/follow-calls-e006/expect.json
  • spec/corpus/integration/follow-calls-e006/helper.cmd
  • spec/corpus/integration/follow-calls-e006/input.cmd
  • spec/corpus/integration/indentation-s012-bounded/expect.json
  • spec/corpus/integration/indentation-s012-bounded/input.cmd
  • spec/corpus/integration/p001-redundant-exist/expect.json
  • spec/corpus/integration/p001-redundant-exist/input.cmd
  • spec/corpus/integration/p002-code-duplication/expect.json
  • spec/corpus/integration/p002-code-duplication/input.cmd
  • spec/corpus/integration/p006-missing-endlocal/expect.json
  • spec/corpus/integration/p006-missing-endlocal/input.cmd
  • spec/corpus/integration/p008-delayed-not-enabled/expect.json
  • spec/corpus/integration/p008-delayed-not-enabled/input.cmd
  • spec/corpus/integration/p017-repeated-exist/expect.json
  • spec/corpus/integration/p017-repeated-exist/input.cmd
  • spec/corpus/integration/p020-redundant-echo-off/expect.json
  • spec/corpus/integration/p020-redundant-echo-off/input.cmd
  • spec/corpus/integration/p027-setlocal-nesting/expect.json
  • spec/corpus/integration/p027-setlocal-nesting/input.cmd
  • spec/corpus/integration/s003-command-casing/expect.json
  • spec/corpus/integration/s003-command-casing/input.cmd
  • spec/corpus/integration/s007-bat-extension/expect.json
  • spec/corpus/integration/s007-bat-extension/input.bat
  • spec/corpus/integration/s008-missing-complex-comment/expect.json
  • spec/corpus/integration/s008-missing-complex-comment/input.cmd
  • spec/corpus/integration/s014-long-params/expect.json
  • spec/corpus/integration/s014-long-params/input.cmd
  • spec/corpus/integration/s015-inconsistent-goto-colon/expect.json
  • spec/corpus/integration/s015-inconsistent-goto-colon/input.cmd
  • spec/corpus/integration/s017-var-case/expect.json
  • spec/corpus/integration/s017-var-case/input.cmd
  • spec/corpus/integration/s022-naming-convention/expect.json
  • spec/corpus/integration/s022-naming-convention/input.cmd
  • spec/corpus/integration/sec001-command-injection/expect.json
  • spec/corpus/integration/sec001-command-injection/input.cmd
  • spec/corpus/integration/sec003-dangerous-del/expect.json
  • spec/corpus/integration/sec003-dangerous-del/input.cmd
  • spec/corpus/integration/sec004-dangerous-reg/expect.json
  • spec/corpus/integration/sec004-dangerous-reg/input.cmd
  • spec/corpus/integration/sec005-privilege-check/expect.json
  • spec/corpus/integration/sec005-privilege-check/input.cmd
  • spec/corpus/integration/sec007-hardcoded-temp/expect.json
  • spec/corpus/integration/sec007-hardcoded-temp/input.cmd
  • spec/corpus/integration/sec008-plaintext-creds/expect.json
  • spec/corpus/integration/sec008-plaintext-creds/input.cmd
  • spec/corpus/integration/sec009-powershell-bypass/expect.json
  • spec/corpus/integration/sec009-powershell-bypass/input.cmd
  • spec/corpus/integration/sec010-sensitive-echo/expect.json
  • spec/corpus/integration/sec010-sensitive-echo/input.cmd
  • spec/corpus/integration/sec011-path-traversal/expect.json
  • spec/corpus/integration/sec011-path-traversal/input.cmd
  • spec/corpus/integration/sec012-unsafe-temp/expect.json
  • spec/corpus/integration/sec012-unsafe-temp/input.cmd
  • spec/corpus/integration/sec013-var-injection/expect.json
  • spec/corpus/integration/sec013-var-injection/input.cmd
  • spec/corpus/integration/sec014-unescaped-input/expect.json
  • spec/corpus/integration/sec014-unescaped-input/input.cmd
  • spec/corpus/integration/sec015-taskkill-unfiltered/expect.json
  • spec/corpus/integration/sec015-taskkill-unfiltered/input.cmd
  • spec/corpus/integration/sec016-restart-no-limit/expect.json
  • spec/corpus/integration/sec016-restart-no-limit/input.cmd
  • spec/corpus/integration/sec017-predictable-temp/expect.json
  • spec/corpus/integration/sec017-predictable-temp/input.cmd
  • spec/corpus/integration/sec018-insecure-redirection/expect.json
  • spec/corpus/integration/sec018-insecure-redirection/input.cmd
  • spec/corpus/integration/sec019-self-modification/expect.json
  • spec/corpus/integration/sec019-self-modification/input.cmd
  • spec/corpus/integration/sec021-fork-bomb/expect.json
  • spec/corpus/integration/sec021-fork-bomb/input.cmd
  • spec/corpus/integration/sec022-hosts-modification/expect.json
  • spec/corpus/integration/sec022-hosts-modification/input.cmd
  • spec/corpus/integration/sec023-autorun-inf/expect.json
  • spec/corpus/integration/sec023-autorun-inf/input.cmd
  • spec/corpus/integration/sec024-self-copy-removable/expect.json
  • spec/corpus/integration/sec024-self-copy-removable/input.cmd
  • spec/corpus/integration/setlocal-delayed-expansion/expect.json
  • spec/corpus/integration/setlocal-delayed-expansion/input.cmd
  • spec/corpus/integration/special-filename-percent/expect.json
  • spec/corpus/integration/special-filename-percent/input.cmd
  • spec/corpus/integration/unreachable-goto-flow/expect.json
  • spec/corpus/integration/unreachable-goto-flow/input.cmd
  • spec/corpus/integration/w005-unquoted-var/expect.json
  • spec/corpus/integration/w005-unquoted-var/input.cmd
  • spec/corpus/integration/w007-locked-path/expect.json
  • spec/corpus/integration/w007-locked-path/input.cmd
  • spec/corpus/integration/w013-duplicate-label/expect.json
  • spec/corpus/integration/w013-duplicate-label/input.cmd
  • spec/corpus/integration/w014-missing-pause/expect.json
  • spec/corpus/integration/w014-missing-pause/input.cmd
  • spec/corpus/integration/w028-bat-errorlevel-ext/expect.json
  • spec/corpus/integration/w028-bat-errorlevel-ext/input.bat
  • spec/corpus/integration/w028-bat-errorlevel/expect.json
  • spec/corpus/integration/w028-bat-errorlevel/input.cmd
  • spec/corpus/meta/corpus-index.yaml
  • spec/corpus/meta/oracle-skip.yaml
  • spec/corpus/syntax/conditional-exec-valid/expect.json
  • spec/corpus/syntax/conditional-exec-valid/input.cmd
  • spec/corpus/syntax/e001-nested-parens/expect.json
  • spec/corpus/syntax/e001-nested-parens/input.cmd
  • spec/corpus/syntax/e002-missing-label/expect.json
  • spec/corpus/syntax/e002-missing-label/input.cmd
  • spec/corpus/syntax/e003-if-format/expect.json
  • spec/corpus/syntax/e003-if-format/input.cmd
  • spec/corpus/syntax/e004-if-exist-mix/expect.json
  • spec/corpus/syntax/e004-if-exist-mix/input.cmd
  • spec/corpus/syntax/e005-invalid-path/expect.json
  • spec/corpus/syntax/e005-invalid-path/input.cmd
  • spec/corpus/syntax/e007-empty-var-check/expect.json
  • spec/corpus/syntax/e007-empty-var-check/input.cmd
  • spec/corpus/syntax/e009-mismatched-quotes/expect.json
  • spec/corpus/syntax/e009-mismatched-quotes/input.cmd
  • spec/corpus/syntax/e010-for-missing-do/expect.json
  • spec/corpus/syntax/e010-for-missing-do/input.cmd
  • spec/corpus/syntax/e011-bang-invalid-expansion/expect.json
  • spec/corpus/syntax/e011-bang-invalid-expansion/input.cmd
  • spec/corpus/syntax/e011-invalid-expansion/expect.json
  • spec/corpus/syntax/e011-invalid-expansion/input.cmd
  • spec/corpus/syntax/e012-missing-call/expect.json
  • spec/corpus/syntax/e012-missing-call/input.cmd
  • spec/corpus/syntax/e013-command-typo/expect.json
  • spec/corpus/syntax/e013-command-typo/input.cmd
  • spec/corpus/syntax/e014-call-missing-colon/expect.json
  • spec/corpus/syntax/e014-call-missing-colon/input.cmd
  • spec/corpus/syntax/e015-goto-eof-missing-colon/expect.json
  • spec/corpus/syntax/e015-goto-eof-missing-colon/input.cmd
  • spec/corpus/syntax/e016-errorlevel-syntax/expect.json
  • spec/corpus/syntax/e016-errorlevel-syntax/input.cmd
  • spec/corpus/syntax/e017-invalid-modifier/expect.json
  • spec/corpus/syntax/e017-invalid-modifier/input.cmd
  • spec/corpus/syntax/e018-unix-endings/expect.json
  • spec/corpus/syntax/e018-unix-endings/input.cmd
  • spec/corpus/syntax/e019-percent-tilde-on-var/expect.json
  • spec/corpus/syntax/e019-percent-tilde-on-var/input.cmd
  • spec/corpus/syntax/e019-tilde-wrong-param/expect.json
  • spec/corpus/syntax/e019-tilde-wrong-param/input.cmd
  • spec/corpus/syntax/e020-for-var-single-percent/expect.json
  • spec/corpus/syntax/e020-for-var-single-percent/input.cmd
  • spec/corpus/syntax/e021-string-substring-invalid/expect.json
  • spec/corpus/syntax/e021-string-substring-invalid/input.cmd
  • spec/corpus/syntax/e021-string-substring-valid/expect.json
  • spec/corpus/syntax/e021-string-substring-valid/input.cmd
  • spec/corpus/syntax/e022-set-a-invalid/expect.json
  • spec/corpus/syntax/e022-set-a-invalid/input.cmd
  • spec/corpus/syntax/e023-set-a-unquoted/expect.json
  • spec/corpus/syntax/e023-set-a-unquoted/input.cmd
  • spec/corpus/syntax/e024-invalid-modifier-combo/expect.json
  • spec/corpus/syntax/e024-invalid-modifier-combo/input.cmd
  • spec/corpus/syntax/e025-tilde-wrong-context/expect.json
  • spec/corpus/syntax/e025-tilde-wrong-context/input.cmd
  • spec/corpus/syntax/e027-unc-cd/expect.json
  • spec/corpus/syntax/e027-unc-cd/input.cmd
  • spec/corpus/syntax/e028-complex-quotes/expect.json
  • spec/corpus/syntax/e028-complex-quotes/input.cmd
  • spec/corpus/syntax/e029-set-a-unbalanced/expect.json
  • spec/corpus/syntax/e029-set-a-unbalanced/input.cmd
  • spec/corpus/syntax/e030-improper-caret/expect.json
  • spec/corpus/syntax/e030-improper-caret/input.cmd
  • spec/corpus/syntax/e031-multilevel-caret/expect.json
  • spec/corpus/syntax/e031-multilevel-caret/input.cmd
  • spec/corpus/syntax/e032-continuation-trailing-space/expect.json
  • spec/corpus/syntax/e032-continuation-trailing-space/input.cmd
  • spec/corpus/syntax/e033-double-percent/expect.json
  • spec/corpus/syntax/e033-double-percent/input.cmd
  • spec/corpus/syntax/e034-removed-command/expect.json
  • spec/corpus/syntax/e034-removed-command/input.cmd
  • spec/corpus/syntax/e035-smart-quotes/expect.json
  • spec/corpus/syntax/e035-smart-quotes/input.cmd
  • spec/corpus/syntax/e036-if-exist-valid/expect.json
  • spec/corpus/syntax/e036-if-exist-valid/input.cmd
  • spec/corpus/syntax/e036-if-exists-typo/expect.json
  • spec/corpus/syntax/e036-if-exists-typo/input.cmd
  • spec/corpus/syntax/e037-for-f-eol-multi/expect.json
  • spec/corpus/syntax/e037-for-f-eol-multi/input.cmd
  • spec/corpus/syntax/e037-for-f-eol-valid/expect.json
  • spec/corpus/syntax/e037-for-f-eol-valid/input.cmd
  • spec/corpus/syntax/e038-for-f-skip-invalid/expect.json
  • spec/corpus/syntax/e038-for-f-skip-invalid/input.cmd
  • spec/corpus/syntax/e038-for-f-skip-zero/expect.json
  • spec/corpus/syntax/e038-for-f-skip-zero/input.cmd
  • spec/corpus/syntax/e038-for-f-tokens-range/expect.json
  • spec/corpus/syntax/e038-for-f-tokens-range/input.cmd
  • spec/corpus/syntax/e038-for-f-valid/expect.json
  • spec/corpus/syntax/e038-for-f-valid/input.cmd
  • spec/corpus/syntax/e039-if-paren-nextline/expect.json
  • spec/corpus/syntax/e039-if-paren-nextline/input.cmd
  • spec/corpus/syntax/e039-if-paren-sameline-valid/expect.json
  • spec/corpus/syntax/e039-if-paren-sameline-valid/input.cmd
  • spec/corpus/syntax/e040-for-do-paren-nextline/expect.json
  • spec/corpus/syntax/e040-for-do-paren-nextline/input.cmd
  • spec/corpus/syntax/e040-for-do-paren-sameline-valid/expect.json
  • spec/corpus/syntax/e040-for-do-paren-sameline-valid/input.cmd
  • spec/corpus/syntax/e041-set-p-missing-var/expect.json
  • spec/corpus/syntax/e041-set-p-missing-var/input.cmd
  • spec/corpus/syntax/e041-set-p-valid/expect.json
  • spec/corpus/syntax/e041-set-p-valid/input.cmd
  • spec/corpus/syntax/else-if-valid/expect.json
  • spec/corpus/syntax/else-if-valid/input.cmd
  • spec/corpus/syntax/exit-shift-smoke-valid/expect.json
  • spec/corpus/syntax/exit-shift-smoke-valid/input.cmd
  • spec/corpus/syntax/for-case-distinct-valid/expect.json
  • spec/corpus/syntax/for-case-distinct-valid/input.cmd
  • spec/corpus/syntax/for-in-parens-valid/expect.json
  • spec/corpus/syntax/for-in-parens-valid/input.cmd
  • spec/corpus/syntax/if-defined-var/expect.json
  • spec/corpus/syntax/if-defined-var/input.cmd
  • spec/corpus/syntax/if-else-block/expect.json
  • spec/corpus/syntax/if-else-block/input.cmd
  • spec/corpus/syntax/if-errorlevel-ge/expect.json
  • spec/corpus/syntax/if-errorlevel-ge/input.cmd
  • spec/corpus/syntax/p004-unnecessary-delayed/expect.json
  • spec/corpus/syntax/p004-unnecessary-delayed/input.cmd
  • spec/corpus/syntax/p005-endlocal-without-setlocal/expect.json
  • spec/corpus/syntax/p005-endlocal-without-setlocal/input.cmd
  • spec/corpus/syntax/p007-temp-no-random/expect.json
  • spec/corpus/syntax/p007-temp-no-random/input.cmd
  • spec/corpus/syntax/p012-string-ops/expect.json
  • spec/corpus/syntax/p012-string-ops/input.cmd
  • spec/corpus/syntax/p013-dir-no-b-flag/expect.json
  • spec/corpus/syntax/p013-dir-no-b-flag/input.cmd
  • spec/corpus/syntax/p015-inefficient-delay/expect.json
  • spec/corpus/syntax/p015-inefficient-delay/input.cmd
  • spec/corpus/syntax/p016-string-concat-loop/expect.json
  • spec/corpus/syntax/p016-string-concat-loop/input.cmd
  • spec/corpus/syntax/p018-for-r-wildcard/expect.json
  • spec/corpus/syntax/p018-for-r-wildcard/input.cmd
  • spec/corpus/syntax/p019-expansion-in-loop/expect.json
  • spec/corpus/syntax/p019-expansion-in-loop/input.cmd
  • spec/corpus/syntax/p021-tasklist-no-fi/expect.json
  • spec/corpus/syntax/p021-tasklist-no-fi/input.cmd
  • spec/corpus/syntax/p022-redir-in-loop/expect.json
  • spec/corpus/syntax/p022-redir-in-loop/input.cmd
  • spec/corpus/syntax/p023-seta-in-loop/expect.json
  • spec/corpus/syntax/p023-seta-in-loop/input.cmd
  • spec/corpus/syntax/p025-wildcard-star/expect.json
  • spec/corpus/syntax/p025-wildcard-star/input.cmd
  • spec/corpus/syntax/p026-redundant-disable-delayed/expect.json
  • spec/corpus/syntax/p026-redundant-disable-delayed/input.cmd
  • spec/corpus/syntax/percent-tilde-dp0-valid/expect.json
  • spec/corpus/syntax/percent-tilde-dp0-valid/input.cmd
  • spec/corpus/syntax/s001-missing-echo-off/expect.json
  • spec/corpus/syntax/s001-missing-echo-off/input.cmd
  • spec/corpus/syntax/s002-echo-off-no-at/expect.json
  • spec/corpus/syntax/s002-echo-off-no-at/input.cmd
  • spec/corpus/syntax/s005-mixed-endings/expect.json
  • spec/corpus/syntax/s005-mixed-endings/input.cmd
  • spec/corpus/syntax/s009-magic-number/expect.json
  • spec/corpus/syntax/s009-magic-number/input.cmd
  • spec/corpus/syntax/s011-line-too-long/expect.json
  • spec/corpus/syntax/s011-line-too-long/input.cmd
  • spec/corpus/syntax/s016-double-colon-lf/expect.json
  • spec/corpus/syntax/s016-double-colon-lf/input.cmd
  • spec/corpus/syntax/s020-long-line/expect.json
  • spec/corpus/syntax/s020-long-line/input.cmd
  • spec/corpus/syntax/s023-magic-timeout/expect.json
  • spec/corpus/syntax/s023-magic-timeout/input.cmd
  • spec/corpus/syntax/s024-complex-oneliner/expect.json
  • spec/corpus/syntax/s024-complex-oneliner/input.cmd
  • spec/corpus/syntax/s028-redundant-parens/expect.json
  • spec/corpus/syntax/s028-redundant-parens/input.cmd
  • spec/corpus/syntax/w006-ping-no-timeout/expect.json
  • spec/corpus/syntax/w006-ping-no-timeout/input.cmd
  • spec/corpus/syntax/w008-path-modification/expect.json
  • spec/corpus/syntax/w008-path-modification/input.cmd
  • spec/corpus/syntax/w009-older-windows-cmd/expect.json
  • spec/corpus/syntax/w009-older-windows-cmd/input.cmd
  • spec/corpus/syntax/w010-architecture-specific/expect.json
  • spec/corpus/syntax/w010-architecture-specific/input.cmd
  • spec/corpus/syntax/w017-errorlevel-semantic/expect.json
  • spec/corpus/syntax/w017-errorlevel-semantic/input.cmd
  • spec/corpus/syntax/w017-not-errorlevel-one-valid/expect.json
  • spec/corpus/syntax/w017-not-errorlevel-one-valid/input.cmd
  • spec/corpus/syntax/w017-not-errorlevel-zero/expect.json
  • spec/corpus/syntax/w017-not-errorlevel-zero/input.cmd
  • spec/corpus/syntax/w018-multibyte-lf/expect.json
  • spec/corpus/syntax/w018-multibyte-lf/input.cmd
  • spec/corpus/syntax/w019-goto-lf/expect.json
  • spec/corpus/syntax/w019-goto-lf/input.cmd
  • spec/corpus/syntax/w021-if-unquoted/expect.json
  • spec/corpus/syntax/w021-if-unquoted/input.cmd
  • spec/corpus/syntax/w023-nested-for/expect.json
  • spec/corpus/syntax/w023-nested-for/input.cmd
  • spec/corpus/syntax/w024-deprecated-wmic/expect.json
  • spec/corpus/syntax/w024-deprecated-wmic/input.cmd
  • spec/corpus/syntax/w026-inefficient-modifiers/expect.json
  • spec/corpus/syntax/w026-inefficient-modifiers/input.cmd
  • spec/corpus/syntax/w027-interpreter-diff/expect.json
  • spec/corpus/syntax/w027-interpreter-diff/input.cmd
  • spec/corpus/syntax/w029-16bit-command/expect.json
  • spec/corpus/syntax/w029-16bit-command/input.cmd
  • spec/corpus/syntax/w031-unicode-filename/expect.json
  • spec/corpus/syntax/w031-unicode-filename/input.cmd
  • spec/corpus/syntax/w034-for-f-usebackq/expect.json
  • spec/corpus/syntax/w034-for-f-usebackq/input.cmd
  • spec/corpus/syntax/w034-useback-synonym-valid/expect.json
  • spec/corpus/syntax/w034-useback-synonym-valid/input.cmd
  • spec/corpus/syntax/w035-for-f-no-delims/expect.json
  • spec/corpus/syntax/w035-for-f-no-delims/input.cmd
  • spec/corpus/syntax/w037-for-f-no-eol/expect.json
  • spec/corpus/syntax/w037-for-f-no-eol/input.cmd
  • spec/corpus/syntax/w038-for-r-no-wildcard/expect.json
  • spec/corpus/syntax/w038-for-r-no-wildcard/input.cmd
  • spec/corpus/syntax/w039-nested-for-no-call/expect.json
  • spec/corpus/syntax/w039-nested-for-no-call/input.cmd
  • spec/corpus/syntax/w040-for-var-scope/expect.json
  • spec/corpus/syntax/w040-for-var-scope/input.cmd
  • spec/corpus/syntax/w042-timeout-nobreak/expect.json
  • spec/corpus/syntax/w042-timeout-nobreak/input.cmd
  • spec/corpus/syntax/w043-taskkill-no-verify/expect.json
  • spec/corpus/syntax/w043-taskkill-no-verify/input.cmd
  • spec/corpus/syntax/w044-set-a-spacing-valid/expect.json
  • spec/corpus/syntax/w044-set-a-spacing-valid/input.cmd
  • spec/corpus/syntax/w044-set-spacing/expect.json
  • spec/corpus/syntax/w044-set-spacing/input.cmd
  • spec/corpus/syntax/w045-set-a-octal/expect.json
  • spec/corpus/syntax/w045-set-a-octal/input.cmd
  • spec/corpus/syntax/w046-if-numeric-compare/expect.json
  • spec/corpus/syntax/w046-if-numeric-compare/input.cmd
  • spec/corpus/syntax/w047-substring-empty/expect.json
  • spec/corpus/syntax/w047-substring-empty/input.cmd
  • spec/corpus/syntax/w047-substring-unset/expect.json
  • spec/corpus/syntax/w047-substring-unset/input.cmd
  • spec/corpus/syntax/w048-for-f-csv/expect.json
  • spec/corpus/syntax/w048-for-f-csv/input.cmd
  • spec/corpus/syntax/w049-pseudo-env-clear-valid/expect.json
  • spec/corpus/syntax/w049-pseudo-env-clear-valid/input.cmd
  • spec/corpus/syntax/w049-pseudo-env-set/expect.json
  • spec/corpus/syntax/w049-pseudo-env-set/input.cmd
  • spec/corpus/syntax/w049-set-a-pseudo-assign/expect.json
  • spec/corpus/syntax/w049-set-a-pseudo-assign/input.cmd
  • spec/corpus/syntax/w049-set-a-pseudo-valid/expect.json
  • spec/corpus/syntax/w049-set-a-pseudo-valid/input.cmd
  • spec/corpus/syntax/w050-shift-invalid-n/expect.json
  • spec/corpus/syntax/w050-shift-invalid-n/input.cmd
  • spec/corpus/syntax/w050-shift-valid-boundaries/expect.json
  • spec/corpus/syntax/w050-shift-valid-boundaries/input.cmd
  • spec/corpus/syntax/w051-for-loop-valid/expect.json
  • spec/corpus/syntax/w051-for-loop-valid/input.cmd
  • spec/corpus/syntax/w051-param-10-ambiguous/expect.json
  • spec/corpus/syntax/w051-param-10-ambiguous/input.cmd
  • spec/corpus/syntax/w051-param-9-valid/expect.json
  • spec/corpus/syntax/w051-param-9-valid/input.cmd
  • spec/corpus/syntax/w052-shift-in-block/expect.json
  • spec/corpus/syntax/w052-shift-in-block/input.cmd
  • spec/corpus/syntax/w052-shift-outside-valid/expect.json
  • spec/corpus/syntax/w052-shift-outside-valid/input.cmd
  • spec/corpus/syntax/w053-shift-bare/expect.json
  • spec/corpus/syntax/w053-shift-bare/input.cmd
  • spec/corpus/syntax/w054-digit-var-delayed-valid/expect.json
  • spec/corpus/syntax/w054-digit-var-delayed-valid/input.cmd
  • spec/corpus/syntax/w054-digit-var-set/expect.json
  • spec/corpus/syntax/w054-digit-var-set/input.cmd
  • spec/corpus/syntax/w055-if-defined-dynamic-valid/expect.json
  • spec/corpus/syntax/w055-if-defined-dynamic-valid/input.cmd
  • spec/corpus/syntax/w055-if-defined-percent/expect.json
  • spec/corpus/syntax/w055-if-defined-percent/input.cmd
  • spec/corpus/syntax/w056-dash-concat-valid/expect.json
  • spec/corpus/syntax/w056-dash-concat-valid/input.cmd
  • spec/corpus/syntax/w056-else-if-pseudo-and/expect.json
  • spec/corpus/syntax/w056-else-if-pseudo-and/input.cmd
  • spec/corpus/syntax/w056-if-nested-valid/expect.json
  • spec/corpus/syntax/w056-if-nested-valid/input.cmd
  • spec/corpus/syntax/w056-if-orange-valid/expect.json
  • spec/corpus/syntax/w056-if-orange-valid/input.cmd
  • spec/corpus/syntax/w056-if-pseudo-and/expect.json
  • spec/corpus/syntax/w056-if-pseudo-and/input.cmd
  • spec/corpus/syntax/w057-bat-with-call-valid/expect.json
  • spec/corpus/syntax/w057-bat-with-call-valid/input.cmd
  • spec/corpus/syntax/w057-bat-without-call/expect.json
  • spec/corpus/syntax/w057-bat-without-call/input.cmd
  • spec/corpus/syntax/w058-ren-path/expect.json
  • spec/corpus/syntax/w058-ren-path/input.cmd
  • spec/corpus/syntax/w058-ren-valid/expect.json
  • spec/corpus/syntax/w058-ren-valid/input.cmd
  • spec/corpus/syntax/w059-for-case-consistent-valid/expect.json
  • spec/corpus/syntax/w059-for-case-consistent-valid/input.cmd
  • spec/corpus/syntax/w059-for-case-mismatch-block/expect.json
  • spec/corpus/syntax/w059-for-case-mismatch-block/input.cmd
  • spec/corpus/syntax/w059-for-case-mismatch/expect.json
  • spec/corpus/syntax/w059-for-case-mismatch/input.cmd
  • spec/corpus/syntax/w060-setx-equals-sign/expect.json
  • spec/corpus/syntax/w060-setx-equals-sign/input.cmd
  • spec/corpus/syntax/w060-setx-valid/expect.json
  • spec/corpus/syntax/w060-setx-valid/input.cmd
  • spec/corpus/syntax/w061-pushd-popd-valid/expect.json
  • spec/corpus/syntax/w061-pushd-popd-valid/input.cmd
  • spec/corpus/syntax/w061-pushd-unbalanced/expect.json
  • spec/corpus/syntax/w061-pushd-unbalanced/input.cmd
  • spec/corpus/syntax/w062-cd-d-valid/expect.json
  • spec/corpus/syntax/w062-cd-d-valid/input.cmd
  • spec/corpus/syntax/w062-cd-no-d-switch/expect.json
  • spec/corpus/syntax/w062-cd-no-d-switch/input.cmd
  • spec/corpus/syntax/w063-for-f-multiline-overflow/expect.json
  • spec/corpus/syntax/w063-for-f-multiline-overflow/input.cmd
  • spec/corpus/syntax/w063-for-f-token-overflow/expect.json
  • spec/corpus/syntax/w063-for-f-token-overflow/input.cmd
  • spec/corpus/syntax/w063-for-f-token-star-overflow/expect.json
  • spec/corpus/syntax/w063-for-f-token-star-overflow/input.cmd
  • spec/corpus/syntax/w063-for-f-token-valid/expect.json
  • spec/corpus/syntax/w063-for-f-token-valid/input.cmd
  • spec/corpus/syntax/w063-for-f-tokens-star-suffix-overflow/expect.json
  • spec/corpus/syntax/w063-for-f-tokens-star-suffix-overflow/input.cmd
  • spec/corpus/syntax/w063-for-f-tokens-star-suffix-valid/expect.json
  • spec/corpus/syntax/w063-for-f-tokens-star-suffix-valid/input.cmd
  • spec/data/commands-linter.yaml
  • spec/data/rules.yaml
  • spec/schema/commands-linter.schema.json
  • spec/schema/corpus-expect.schema.json
  • spec/schema/rules.schema.json
  • src/blinter/checkers/__init__.py
  • src/blinter/checkers/advanced/__init__.py
  • src/blinter/checkers/advanced/enhanced.py
  • src/blinter/checkers/advanced/escaping.py
  • src/blinter/checkers/advanced/style_security_perf.py
  • src/blinter/checkers/advanced/vars_syntax.py
  • src/blinter/checkers/globals/__init__.py
  • src/blinter/checkers/globals/analysis.py
  • src/blinter/checkers/globals/exit_flow.py
  • src/blinter/checkers/globals/style_globals.py
  • src/blinter/checkers/line_endings.py
  • src/blinter/checkers/orchestration.py
  • src/blinter/checkers/performance.py
  • src/blinter/checkers/security.py
  • src/blinter/checkers/style.py
  • src/blinter/checkers/syntax.py
  • src/blinter/checkers/vars.py
  • src/blinter/checkers/warnings.py
  • src/blinter/cli/args.py
  • src/blinter/cli/main.py
  • src/blinter/constants.py
  • src/blinter/engine/linter.py
  • src/blinter/parsing/antlr_bridge.py
  • src/blinter/parsing/ast_pipeline.py
  • src/blinter/parsing/fast_syntax.py
  • src/blinter/parsing/grammar_rules.py
  • src/blinter/parsing/preprocessor.py
  • src/blinter/parsing/structure.py
  • src/blinter/parsing/visitors/__init__.py
  • src/blinter/parsing/visitors/encoding_visitor.py
  • src/blinter/parsing/visitors/flow_visitor.py
  • src/blinter/parsing/visitors/heuristic_visitors.py
  • src/blinter/parsing/visitors/rule_impl/__init__.py
  • src/blinter/parsing/visitors/rule_impl/advanced/__init__.py
  • src/blinter/parsing/visitors/rule_impl/advanced/enhanced.py
  • src/blinter/parsing/visitors/rule_impl/advanced/escaping.py
  • src/blinter/parsing/visitors/rule_impl/advanced/style_security_perf.py
  • src/blinter/parsing/visitors/rule_impl/advanced/vars_syntax.py
  • src/blinter/parsing/visitors/rule_impl/globals/__init__.py
  • src/blinter/parsing/visitors/rule_impl/globals/analysis.py
  • src/blinter/parsing/visitors/rule_impl/globals/exit_flow.py
  • src/blinter/parsing/visitors/rule_impl/globals/for_scope.py
  • src/blinter/parsing/visitors/rule_impl/globals/style_globals.py
  • src/blinter/parsing/visitors/rule_impl/line_endings.py
  • src/blinter/parsing/visitors/rule_impl/performance.py
  • src/blinter/parsing/visitors/rule_impl/security.py
  • src/blinter/parsing/visitors/rule_impl/style.py
  • src/blinter/parsing/visitors/rule_impl/syntax.py
  • src/blinter/parsing/visitors/rule_impl/vars.py
  • src/blinter/parsing/visitors/rule_impl/warnings.py
  • src/blinter/parsing/visitors/setlocal_visitor.py
  • src/blinter/parsing/visitors/structure_visitor.py
  • src/blinter/parsing/visitors/symbol_visitor.py
  • src/blinter/parsing/visitors/syntax_visitor.py
  • src/blinter/patterns.py
  • src/blinter/rules/expansion_data.py
  • src/blinter/rules/registry.py
  • tests/conftest.py
  • tests/corpus_support.py
  • tests/spec_corpus_support.py
  • tests/test_batch_script_examples.py
  • tests/test_batch_spec_pin.py
  • tests/test_configuration.py
  • tests/test_docs_sync.py
  • tests/test_edge_cases.py
  • tests/test_fast_syntax.py
  • tests/test_lint_functionality.py
  • tests/test_main_cli.py
  • tests/test_orchestration.py
  • tests/test_performance.py
  • tests/test_preprocessor.py
  • tests/test_runtime_dependencies.py
  • tests/test_spec_corpus.py
  • tests/test_spec_parser.py
  • tests/test_spec_rules.py
  • vendor/batch-spec

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch SST

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

tboy1337 added 23 commits July 21, 2026 23:56
…oving clarity and reducing redundant imports. Update _rule_to_dict function to ensure type safety with Rule instances.
…endency.

Preserve spec/corpus fixture bytes with -text gitattributes so Linux CI no longer converts .cmd files to CRLF and breaks E018/S005 oracles; restore true mixed endings in s005-mixed-endings; install requirements-dev.txt for Windows exe job.
Run the corpus/parser smoke pytest without coverage enforcement, and regenerate ANTLR parser output so generate_parser.py --check passes on Linux CI.
Hash spec/grammar .g4 files with LF-normalized bytes so generate_parser.py --check passes on Linux and Windows checkouts.
The global id(lines) cache could return stale empty-variable sets after list reuse in long pytest runs, causing W047 to be skipped on Python 3.11 CI.
Read stdout/stderr concurrently in Invoke-BlinterProcess so linting verbose scripts cannot hang the CI smoke step for six hours.
…acy and add delayed expansion state caching.

- Updated LABEL rule in BatchLexer to ensure it only matches at the start of a line.
- Refined WORD rule in BatchLexer to include additional characters.
- Modified BatchParser to use ifPredicate instead of ifCondition for better clarity.
- Introduced caching for delayed expansion state and privilege checks in parsing logic.
- Improved error handling in ANTLR parsing with SLL and LL strategies.
- Updated various parsing functions to utilize new caching mechanisms for efficiency.
…NTLR-based syntax check function.

- Updated `check_ast_syntax_rules` to use `check_grammar_backed_syntax_fast` for improved performance.
- Added `check_ast_syntax_rules_antlr` function to maintain ANTLR parsing for conformance tests.
- Adjusted timeout for performance test to ensure quicker execution.
- Created .gitmodules file to track the batch-spec submodule.
- Initialized the batch-spec submodule pointing to the specified GitHub repository.
- Enhanced README.md to clarify the cloning process with submodules and added instructions for updating existing clones.
- Updated test workflow to ensure submodules are checked out recursively.
- Revised Architecture.md and Batch-Language-Reference.md to reflect the new structure and location of batch-spec artifacts.
- Adjusted paths in scripts to accommodate the new batch-spec directory structure and updated YAML file references.
- Removed outdated command help files and commands.yaml, transitioning to commands-linter.yaml for linter-specific command policies.
- Improved validation and generation scripts to handle the new batch-spec integration.
Update the pinned language spec ref and lock file to match the new batch-spec release.
- Updated `benchmark_lint.py` and `lint_corpus.py` to import `Path` from `pathlib` for consistency.
- Reformatted code for better readability in `audit_ssot.py`.
- Deleted obsolete scripts: `bootstrap_corpus_expect.py`, `extract_commands_to_yaml.py`, `extract_corpus.py`, `extract_rules_to_yaml.py`, and `lint_corpus.py` to streamline the codebase.
- Updated `generate_commands.py` for improved import structure.
- Minor adjustments in test files for better assertion formatting.
Align Build-Release-PYPI with scripts/verify.py and submodule checkout, remove committed corpus oracle artifact, trim unused mypy config, and bump batch-spec for a corrected expansion comment.
Tags are required for test_batch_spec_lock_matches_checkout after moving past the v0.2.0 release.
- Added `antlr4-python3-runtime` to runtime and development dependencies in `pyproject.toml` and `requirements.txt`.
- Expanded `hiddenimports` in `Blinter.spec` to include additional ANTLR components.
- Updated CI workflows to include new smoke tests for the executable and improved static analysis checks with `autopep8`.
- Revised README.md to reflect changes in CI processes and testing scripts.
- Added new argument handlers for `--max-line-length`, `--config`, `--output`, and `--format` in `args.py` to streamline command-line argument processing.
- Refactored `_process_dash_argument` to utilize the new handlers for better maintainability.
- Updated `README.md` to correct the command for running `pip-audit`.
- Added `.audit-venv` to `.gitignore` to exclude the audit virtual environment from version control.
- Removed unused import `LintIssue` in `main.py` for cleaner code.
- Introduced a new function to handle trailing whitespace checks using `autopep8` in `verify.py`.
- Updated `generate_docs.py` to include a new function for updating README rule-count prose based on `rules.yaml`.
- Added functionality to strip trailing whitespace from generated parser files in `generate_parser.py`.
- Improved handling of delayed expansion in `fast_syntax.py` and `syntax_visitor.py` to ensure consistency across syntax checks.
- Added new tests in `test_fast_syntax.py` to validate delayed expansion behavior and ensure alignment between fast and ANTLR syntax checks.
- Updated CI workflows to run quality checks with an option to skip tests for improved efficiency in CI environments.
- Enhanced `verify.py` to include a check for the installed version of `antlr4-python3-runtime` to ensure compatibility with the generator pin.
- Revised documentation in `Architecture.md` and `Batch-Language-Reference.md` to clarify the linting process and the role of the grammar-backed syntax scanner.
- Removed deprecated `delayed_expansion_tokens.py` to streamline the codebase and improve maintainability.
- Added tests in `test_fast_syntax.py` to validate delayed expansion behavior and ensure alignment between fast and ANTLR syntax checks.
- Updated Pylint configuration to ignore generated files for cleaner linting results.
- Introduced a new test job in CI workflows to run tests across multiple Python versions, ensuring compatibility and stability.
- Refactored `verify.py` to include checks for requirements drift between `pyproject.toml` and requirements files, enhancing dependency management.
- Improved handling of delayed expansion in the parsing logic, ensuring accurate linting for batch scripts.
- Added tests to validate delayed expansion behavior and ensure consistency across syntax checks.
- Added new entries to `.gitignore` for `venv-ci` and `.benchmarks/` to prevent unnecessary files from being tracked.
- Updated `funding.json` to reflect the current year in the project description.
- Introduced PowerShell quality checks in CI workflows to ensure script integrity.
- Refactored `verify.py` to streamline PowerShell checks and added a new function for handling black formatting.
- Enhanced `cmd_oracle.py` with a new function to classify corpus cases, improving the organization of runnable and skipped cases.
- Updated documentation to reflect changes in the conformance corpus and clarify the linting process.
- Fixed minor whitespace issues in configuration and test files for consistency.
- Added new entries to `.gitignore` for `coverage.json`, `coverage.lcov`, and `.hypothesis/` to streamline file tracking.
- Simplified test execution commands in CI workflows for clarity and efficiency.
- Introduced verification steps for the `batch-spec` submodule in CI to ensure proper setup.
- Enhanced `Architecture.md` and `README.md` documentation to reflect current corpus counts and batch-spec references.
- Added tests to validate documentation consistency and relative link resolution in `Architecture.md`.
@tboy1337 tboy1337 closed this Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant