Thread (15 messages) 15 messages, 5 authors, 2018-06-28

Re: [PATCH 29/29] t/test-lib: teach --chain-lint to detect broken &&-chains in subshells

From: Eric Sunshine <hidden>
Date: 2018-06-26 20:59:45

Possibly related (same subject, not in this thread)

On Tue, Jun 26, 2018 at 4:22 PM Jeff King [off-list ref] wrote:
So obviously that means "I don't think there's a good solution with this
approach".

That whole final patch simultaneously impresses and nauseates me. Your
commit message says "no attempt is made at properly parsing shell code",
but we come pretty darn close. I almost wonder if we'd be better off
just parsing some heuristic subset and making sure (via review or
linting) that our tests conform.
I'm not sure I agree with "come pretty darn close", but your idea is
an interesting one. It would sidestep the concern with "rm -fr" and
friends (though it will probably still nauseate you). Let me cogitate
about it a bit...
Another option is to not enable this slightly-more-dangerous linting by
default. But that would probably rob it of its usefulness, since it
would just fall to some brave soul to later crank up the linting and fix
everybody else's mistakes.
I considered that, as well, and came to the same conclusion.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help