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

Re: [PATCH] t: avoid sed-based chain-linting in some expensive cases

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
May 13, 2021, 11:05 UTC
Message-ID
<CAN0heSp3mXQeqeC_Zd==bBoJCCWe-NzJsomuUf6MTxy7+WZ1wA@mail.gmail.com>
In-Reply-To
<YJzGcZpZ+E9R0gYd@coredump.intra.peff.net>
On Thu, 13 May 2021 at 08:29, Jeff King <peff@peff.net> wrote:
Show 10 quoted lines
> This patch introduces a mechanism for controlling when those extra
> lint checks are run, at two levels:
>
>   - a user can ask to disable or to force-enable the checks by setting
>     GIT_TEST_CHAIN_LINT_HARDER
>
>   - if the user hasn't specified a preference, individual scripts can
>     disable the checks by setting GIT_TEST_CHAIN_LINT_HARDER_DEFAULT;
>     scripts which don't set that get the current behavior of enabling
>     them.
> +# Disable expensive chain-lint tests; all of the tests in this script
> +# are variants of a few trivial test-tool invocations, and there are a lot of
> +# them.
> +GIT_TEST_CHAIN_LINT_HARDER_DEFAULT=0

Devil's advocate: Who do we expect to turn GIT_TEST_CHAIN_LINT_HARDER on, and when? If no one ever does it then we might as well drop the "default" thing and just go "we won't bother linting these particular tests, ever". But as long as "someone" does it "sometimes", it's not like it's a very complex mechanism to carry around.

I seem to have 140 tests that haven't changed on disk since I did this particular clone in 2017. 235 haven't changed this calendar year. Maybe we could skip linting those tests that haven't been modified for several weeks on the basis that they can't reasonably have newly-introduced syntax mistakes. I guess it gets tricky where the t????-*.sh file doesn't change in a long time, but it sources tests from other places, such as a lib-foo.sh helper. We'd have to be a bit more clever there. That's all just thinking out loud, and definitely not something that should hold up your patch.

Martin
Previous: Jeff KingNext: Jeff King
Message 4 of 7 in “t: avoid sed-based chain-linting in some expensive cases”
  1. t: avoid sed-based chain-linting in some expensive casesJeff King, May 13, 2021
  2. Junio C HamanoMay 13, 2021
  3. Jeff KingMay 13, 2021
  4. Martin ÅgrenMay 13, 2021
  5. Jeff KingMay 14, 2021
  6. Martin ÅgrenMay 14, 2021
  7. Jeff KingMay 15, 2021

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.