]> git.99rst.org Git - git.git/commit
t: extract chainlint's parser into shared module
authorMichael Montalbo <redacted>
Mon, 6 Jul 2026 05:01:55 +0000 (05:01 +0000)
committerJunio C Hamano <redacted>
Mon, 6 Jul 2026 20:26:59 +0000 (13:26 -0700)
commitc451e96f3f6da47bab881b6b1246417691ce66d4
tree1e695c5e4d0eeabe1ea82e5ee7785e7207dc82d2
parent04e875a364f5a3792077a3e90c6f546b4cf7ea4c
t: extract chainlint's parser into shared module

Move chainlint.pl's Lexer, ShellParser, and ScriptParser into a
shared module (lib-shell-parser.pl) so other lint tools can reuse
the same shell parsing infrastructure.  A subsequent commit adds
greplint.pl, which needs the same tokenizer to correctly identify
command boundaries.

ScriptParser's check_test() becomes a no-op in the shared module.
chainlint.pl defines ChainlintParser (extending ScriptParser)
with the &&-chain check_test() implementation.

No functional change: chainlint produces the same output and
check-chainlint self-tests pass.

Signed-off-by: Michael Montalbo <redacted>
Signed-off-by: Junio C Hamano <redacted>
t/chainlint.pl
t/lib-shell-parser.pl [new file with mode: 0644]
git clone https://git.99rst.org/PROJECT