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

[PATCH 0/2] make chainlint output more newcomer-friendly

From
ESEric Sunshine <ericsunshine@charter.net>
Date
Aug 29, 2024, 09:16 UTC
Message-ID
<20240829091625.41297-1-ericsunshine@charter.net>
From: Eric Sunshine <sunshine@sunshineco.com>

For the sake of newcomers to the project, I have several times over the last couple years thought to update t/README to explain the rather cryptic and terse problem annotations emitted by chainlint (i.e. "?!FOO?!"), but I never got around to it. However, a review comment[*] I posted recently suggesting an update to CodingGuidelines reminded me of the need to update t/README.

As such, I set about to do so but quickly realized that it would be far more useful to newcomers for chainlint to emit friendly problem descriptions rather than expecting users to know to consult t/README to interpret the existing cryptic annotations. This patch series, which improves chainlint's output, is the result of that epiphany.

[*]: https://lore.kernel.org/git/CAPig+cQLr+vAzkt8UJNVCeE8osGEcEfFunG36oqxa0k8JamJzQ@mail.gmail.com/
Eric Sunshine (2):
  chainlint: make error messages self-explanatory
  chainlint: reduce annotation noise-factor
 t/chainlint.pl                                | 33 ++++++++++++++-----
 t/chainlint/arithmetic-expansion.expect       |  2 +-
 t/chainlint/block.expect                      |  8 ++---
 t/chainlint/broken-chain.expect               |  2 +-
 t/chainlint/case.expect                       |  4 +--
 t/chainlint/chain-break-false.expect          |  2 +-
 t/chainlint/chained-block.expect              |  2 +-
 t/chainlint/chained-subshell.expect           |  4 +--
 t/chainlint/command-substitution.expect       |  2 +-
 t/chainlint/complex-if-in-cuddled-loop.expect |  2 +-
 t/chainlint/cuddled.expect                    |  4 +--
 t/chainlint/for-loop.expect                   |  8 ++---
 t/chainlint/function.expect                   |  4 +--
 t/chainlint/here-doc-body-indent.expect       |  2 +-
 t/chainlint/here-doc-body-pathological.expect |  4 +--
 t/chainlint/here-doc-body.expect              |  4 +--
 t/chainlint/here-doc-double.expect            |  2 +-
 t/chainlint/here-doc-indent-operator.expect   |  2 +-
 .../here-doc-multi-line-command-subst.expect  |  2 +-
 t/chainlint/here-doc-multi-line-string.expect |  2 +-
 t/chainlint/if-condition-split.expect         |  2 +-
 t/chainlint/if-in-loop.expect                 |  4 +--
 t/chainlint/if-then-else.expect               |  4 +--
 t/chainlint/inline-comment.expect             |  2 +-
 t/chainlint/loop-detect-failure.expect        |  2 +-
 t/chainlint/loop-in-if.expect                 |  8 ++---
 t/chainlint/multi-line-string.expect          |  2 +-
 t/chainlint/negated-one-liner.expect          |  4 +--
 t/chainlint/nested-cuddled-subshell.expect    |  6 ++--
 t/chainlint/nested-here-doc.expect            |  2 +-
 t/chainlint/nested-loop-detect-failure.expect |  6 ++--
 t/chainlint/nested-subshell-comment.expect    |  2 +-
 t/chainlint/nested-subshell.expect            |  2 +-
 t/chainlint/not-heredoc.expect                |  2 +-
 t/chainlint/one-liner-for-loop.expect         |  2 +-
 t/chainlint/one-liner.expect                  |  6 ++--
 t/chainlint/pipe.expect                       |  2 +-
 t/chainlint/semicolon.expect                  | 12 +++----
 t/chainlint/subshell-here-doc.expect          |  2 +-
 t/chainlint/subshell-one-liner.expect         | 10 +++---
 t/chainlint/token-pasting.expect              |  8 ++---
 t/chainlint/unclosed-here-doc-indent.expect   |  2 +-
 t/chainlint/unclosed-here-doc.expect          |  2 +-
 t/chainlint/while-loop.expect                 |  8 ++---
 t/test-lib.sh                                 |  2 +-
 45 files changed, 108 insertions(+), 91 deletions(-)
-- 
2.46.0
Next: Eric Sunshine
Message 1 of 29 in “make chainlint output more newcomer-friendly”
  1. 0/2 make chainlint output more newcomer-friendlyEric Sunshine, Aug 29, 2024
  2. 1/2 chainlint: make error messages self-explanatoryEric Sunshine, Aug 29, 2024
  3. Patrick SteinhardtAug 29, 2024
  4. Jeff KingAug 29, 2024
  5. Eric SunshineAug 29, 2024
  6. Eric SunshineAug 29, 2024
  7. Junio C HamanoAug 29, 2024
  8. Eric SunshineAug 29, 2024
  9. Junio C HamanoAug 30, 2024
  10. 2/2 chainlint: reduce annotation noise-factorEric Sunshine, Aug 29, 2024
  11. Patrick SteinhardtAug 29, 2024
  12. Jeff KingAug 29, 2024
  13. Eric SunshineAug 29, 2024
  14. Eric SunshineAug 29, 2024
  15. Junio C HamanoAug 29, 2024
  16. Eric SunshineAug 30, 2024
  17. Junio C HamanoAug 30, 2024
  18. 0/3 make chainlint output more newcomer-friendlyEric Sunshine, Sep 10, 2024
  19. 1/3 chainlint: don't be fooled by "?!...?!" in test bodyEric Sunshine, Sep 10, 2024
  20. Junio C HamanoSep 10, 2024
  21. 2/3 chainlint: make error messages self-explanatoryEric Sunshine, Sep 10, 2024
  22. Patrick SteinhardtSep 10, 2024
  23. 3/3 chainlint: reduce annotation noise-factorEric Sunshine, Sep 10, 2024
  24. Patrick SteinhardtSep 10, 2024
  25. Eric SunshineSep 10, 2024
  26. Junio C HamanoSep 10, 2024
  27. Eric SunshineSep 10, 2024
  28. Jeff KingSep 10, 2024
  29. Junio C HamanoSep 10, 2024

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.