git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/4] t: run greplint checks inside chainlint

From
Tyler Cipriani <tyler@tylercipriani.com>
Date
Oct 25, 2026, 06:35 UTC
Message-ID
<20261025063508.3026136-1-tyler@tylercipriani.com>
In-Reply-To
<xmqqjynueq81.fsf@gitster.g>
As Junio said[0], make test-lint is "uncomfortably slow".

make test-lint runs both t/chainlint.pl and t/greplint.pl which do mostly the same thing on mostly the same files, both:

- Open about 1100 files
- Parse/lex/tokenize the files
- Run checks - which is the only place chainlint and greplint vary

Plus, greplint processes files serially. So we're doing the same work twice and half the work happens in serial.

Following Peff's suggestion, this series teaches chainlint.pl to run the greplint checks while running checks on its own tokens. So "make test-lint" parses each file once, in parallel.

Keep greplint.pl as a standalone for GIT_TEST_CHAIN_LINT=0.

Peff's early return (patch 2) speeds up standalone greplint.pl (when greplint does its own parsing).

Peff: Can I add your Signed-off-by to your patch in the series? It does,
indeed, cut time in half when greplint does its own parsing.
Before this series:
    $ time sh -c 'for c in 1 2 3 4 5; do make test-lint; done'
    real    0m25.158s
    user    0m51.557s
    sys     0m0.899s
After this series:
    $ time sh -c 'for c in 1 2 3 4 5; do make test-lint; done'
    real    0m5.972s
    user    0m41.536s
    sys     0m0.943s
(nproc == 16 for both)
[0]. https://lore.kernel.org/git/xmqqjynueq81.fsf@gitster.g/
Jeff King (1):
  t/greplint: skip test bodies without the word grep
Tyler Cipriani (3):
  t/interop: replace bare grep with test_grep
  t/greplint: move parsing and token check to library
  t/chainlint: add --greplint to run greplint
 t/Makefile                             |  30 +++-
 t/chainlint.pl                         |  24 ++-
 t/greplint.pl                          | 240 +------------------------
 t/interop/i5700-protocol-transition.sh |  10 +-
 t/{greplint.pl => lib-greplint.pl}     |  78 ++++----
 5 files changed, 93 insertions(+), 289 deletions(-)
 copy t/{greplint.pl => lib-greplint.pl} (85%)
base-commit: 7e34d8174dcda3435d1404c9a30bef46afe6c13e
-- 
2.47.3
Previous: Jeff KingNext: Tyler Cipriani
Message 3 of 7 in “test-grep-lint is uncomfortably slow”
  1. Junio C HamanoOct 6, 2026
  2. Jeff KingOct 14, 2026
  3. 0/4 t: run greplint checks inside chainlintTyler Cipriani, Oct 25, 2026
  4. 1/4 t/interop: replace bare grep with test_grepTyler Cipriani, Oct 25, 2026
  5. 2/4 t/greplint: skip test bodies without the word grepTyler Cipriani, Oct 25, 2026
  6. 3/4 t/greplint: move parsing and token check to libraryTyler Cipriani, Oct 25, 2026
  7. 4/4 t/chainlint: add --greplint to run greplintTyler Cipriani, Oct 25, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.