Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [RFC] Add basic syntax check on shell scripts

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:55:29

Jeff King [off-list ref] writes:
You would want a "check shell script portability" script, and you would
probably want to run it:

  - on the regular built scripts; possibly during build time (I have done
    this before with "perl -c" for perl scripts and it is reasonably
    successful). Or in a test script, as added in his patch (though I
    note it does not seem to pass as posted, getting confused by trying
    to grep "git-gui").

  - on the test scripts themselves via test-lint

I think as long as such a script erred on the side of false negatives,
it would be OK (because false positives are a giant headache, and
ultimately the real test is people exercising the code itself on their
shells; this is just an early check to help contributors who do not have
such shells).
Yeah, you have a good point that we should cover the scripts outside tests
and test-lint is not a good match for them.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help