Commit Graph

2 Commits

Author SHA1 Message Date
Mike Lang
a781575611 shell-lint: Don't fail if no shell scripts found
This fixes the case where the provided paths do not contain any shell scripts,
ie. xargs is passed no values.
In this case by default, xargs invokes the command once with no args.
This causes shellcheck to print usage and exit failure.
The GNU-specific --no-run-if-empty changes the behaviour so that in this case,
shellcheck is simply never run.

This allows us to use this script as a general lint even in contexts where
no shell scripts are present, or none of the files passed are shell scripts.
2016-08-17 14:23:52 +01:00
Jonathan Lange
239935c063 shell-lint tool 2016-07-08 15:25:43 +01:00