From: Junio C Hamano Date: Wed, 05 Dec 2012 16:12:21 GMT Subject: Re: [RFC] Add basic syntax check on shell scripts Message-ID: <7vehj4lbq2.fsf@alter.siamese.dyndns.org> In-Reply-To: <20121205075401.GB5776@sigill.intra.peff.net> Jeff King 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.