chainlint: improve annotated output
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 6 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | chainlint: add explanatory commentst/ | +4 | 0 replies | |
| 2/4 | chainlint: tighten accuracy when consuming input streamt/ | +1 | 0 replies | |
| 3/4 | chainlint: latch start/end position of each tokent/ | +43 | 0 replies | |
| 4/4 | chainlint: annotate original test definition rather than token streamt/ t/ t/ +19 more | +163 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] chainlint: improve annotated output
When chainlint detects problems in a test, such as a broken &&-chain, it prints out the test with "?!FOO?!" annotations inserted at each problem location. However, rather than annotating the original test definition, it instead dumps out a parsed token representation of the test. Since it lacks comments, indentation, here-doc bodies, and so forth, this tokenized representation can be difficult for the test author to digest and relate back to the original test definition.
An earlier patch series[1] improved the output somewhat by colorizing the "?!FOO?!" annotations and the "# chainlint:" lines, but the output can still be difficult to digest.
This patch series further improves the output by instead making chainlint.pl annotate the original test definition rather than the parsed token stream, thus preserving indentation (and whitespace, in general), here-doc bodies, etc., which should make it easier for a test author to relate each problem back to the source.
This series was inspired by usability comments from Peff[2] and Ævar[3] and a bit of discussion which followed[4][5].
(Note to self: Add Ævar to nerd-snipe blacklist alongside Peff.)
FOOTNOTES
[1]
https://lore.kernel.org/git/[email protected]/
[2] https://lore.kernel.org/git/[email protected]/
[3] https://lore.kernel.org/git/[email protected]/
[4]
https://lore.kernel.org/git/CAPig+cRJVn-mbA6-jOmNfDJtK_nX4ZTw+OcNShvvz8zcQYbCHQ@mail.gmail.com/
[5]
https://lore.kernel.org/git/CAPig+cT=cWYT6kicNWT+6RxfiKKMyVz72H3_9kwkF-f4Vuoe1w@mail.gmail.com/
Eric Sunshine (4):
chainlint: add explanatory comments
chainlint: tighten accuracy when consuming input stream
chainlint: latch start/end position of each token
chainlint: annotate original test definition rather than token stream
t/chainlint.pl | 107 +++++++++++------- t/chainlint/block-comment.expect | 2 + t/chainlint/case-comment.expect | 3 + t/chainlint/close-subshell.expect | 3 +- t/chainlint/comment.expect | 4 + t/chainlint/double-here-doc.expect | 14 ++- t/chainlint/empty-here-doc.expect | 3 +- t/chainlint/for-loop.expect | 4 +- t/chainlint/here-doc-close-subshell.expect | 4 +- t/chainlint/here-doc-indent-operator.expect | 10 +- .../here-doc-multi-line-command-subst.expect | 5 +- t/chainlint/here-doc-multi-line-string.expect | 4 +- t/chainlint/here-doc.expect | 24 +++- t/chainlint/if-then-else.expect | 4 +- t/chainlint/incomplete-line.expect | 10 +- t/chainlint/inline-comment.expect | 4 +- t/chainlint/loop-detect-status.expect | 2 +- t/chainlint/nested-here-doc.expect | 27 ++++- t/chainlint/nested-subshell-comment.expect | 2 + t/chainlint/subshell-here-doc.expect | 28 ++++- t/chainlint/t7900-subtree.expect | 4 + t/chainlint/while-loop.expect | 4 +- 22 files changed, 206 insertions(+), 66 deletions(-)
base-commit: 63bba4fdd86d80ef061c449daa97a981a9be0792
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1375%2Fsunshineco%2Fchainlintpreserve-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1375/sunshineco/chainlintpreserve-v1
Pull-Request: https://github.com/git/git/pull/1375
Signature · 1 line
gitgitgadget