This series improves chainlint's robustness when faced with the sort of unusual shell coding in contrib/subtree/t7900 which triggered a false-positive, as reported by Jonathan[1]. Jonathan has already rewritten[2] that code to be cleaner and more easily understood (and, consequently, to avoid triggering the false-positive), thus the improvements in this series are not strictly necessary. Nevertheless, it seems prudent to make chainlint more robust against such unusual coding as an aid to future less-experienced test writers, making it less likely for them to trigger a false-positive and waste time trying to decipher a non-existent problem (in their code). In [3], I said that 'sed' couldn't "be coerced" into dealing with nested here-docs with arbitrary tag names (explaining why it recognized only a "blessed" set of hard-coded names). However, I put a bit of thought into it and figured out how to do it. Patch 1/5 is the result. This applies atop 'master'. [1]: https://public-inbox.org/git/20180730181356.GA156463@xxxxxxxxxxxxxxxxxxxxxxxxx/ [2]: https://public-inbox.org/git/20180730190738.GD156463@xxxxxxxxxxxxxxxxxxxxxxxxx/ [3]: https://public-inbox.org/git/CAPig+cRTgh6DStUdmXqvhbL_7sQY6wu21h27rjq_i=kZ_d+LAw@xxxxxxxxxxxxxx/ Eric Sunshine (5): chainlint: match arbitrary here-docs tags rather than hard-coded names chainlint: recognize multi-line $(...) when command cuddled with "$(" chainlint: let here-doc and multi-line string commence on same line chainlint: recognize multi-line quoted strings more robustly chainlint: add test of pathological case which triggered false positive t/chainlint.sed | 98 ++++++++++++------- t/chainlint/here-doc-close-subshell.expect | 2 + t/chainlint/here-doc-close-subshell.test | 5 + .../here-doc-multi-line-command-subst.expect | 5 + .../here-doc-multi-line-command-subst.test | 9 ++ t/chainlint/here-doc-multi-line-string.expect | 4 + t/chainlint/here-doc-multi-line-string.test | 8 ++ t/chainlint/here-doc.expect | 2 + t/chainlint/here-doc.test | 7 ++ ...ti-line-nested-command-substitution.expect | 11 ++- ...ulti-line-nested-command-substitution.test | 11 ++- t/chainlint/multi-line-string.expect | 10 +- t/chainlint/multi-line-string.test | 12 +++ t/chainlint/nested-here-doc.expect | 2 + t/chainlint/nested-here-doc.test | 10 ++ t/chainlint/subshell-here-doc.expect | 4 + t/chainlint/subshell-here-doc.test | 8 ++ t/chainlint/t7900-subtree.expect | 10 ++ t/chainlint/t7900-subtree.test | 22 +++++ 19 files changed, 199 insertions(+), 41 deletions(-) create mode 100644 t/chainlint/here-doc-close-subshell.expect create mode 100644 t/chainlint/here-doc-close-subshell.test create mode 100644 t/chainlint/here-doc-multi-line-command-subst.expect create mode 100644 t/chainlint/here-doc-multi-line-command-subst.test create mode 100644 t/chainlint/here-doc-multi-line-string.expect create mode 100644 t/chainlint/here-doc-multi-line-string.test create mode 100644 t/chainlint/t7900-subtree.expect create mode 100644 t/chainlint/t7900-subtree.test -- 2.18.0.758.g1932418f46