Re: [PATCH 0/6] t: add lint-style.pl and convert grep to test_grep
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 8, 2026, 21:36 UTC
- Message-ID
- <xmqqldcovhnf.fsf@gitster.g>
- In-Reply-To
- <pull.2135.git.1780559158.gitgitgadget@gmail.com>
"Michael Montalbo via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 6 quoted lines
> The test suite has a test_grep wrapper that prints file contents on > assertion failure, making debugging easier. Many tests still use bare 'grep' > for assertions, which silently swallows context on failure. > > This series adds a lint tool (lint-style.pl) to mechanically detect and > convert these, then applies it across the test suite.
I do not think we want an automated tool that rewrites the source files. I was hoping that we would get a patch or two that _adds_ to existing test-lint framework (i.e., 'test-grep' that 'test-lint' target depends on in t/Makefile) that gives diagnosis in a similar fashion as test-lint-shell-syntax and test-chainlint do.
Also some existing uses of "grep" are not end-user facing and should not be rewritten to "test_grep".