Add lint:shellcheck:package (#7568)
* Add lint:shellcheck:package * Add double quote as per jq suggestion * Use single quotes * Ignore SC2016 * Use shellcheck script * Set some flags * Put shellcheck --version on new line * Disable SC2016 (singe quotes is actually what we want here)feature/default_network_editable
parent
12fb5ad985
commit
e5682eec38
@ -0,0 +1,14 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
set -e |
||||
set -u |
||||
set -x |
||||
set -o pipefail |
||||
|
||||
shellcheck --version |
||||
# lint all *.sh files |
||||
find . -type f -name '*.sh' ! -path './node_modules/*' -print0 | xargs -0 shellcheck |
||||
# lint all .scripts in package.json |
||||
# shellcheck disable=SC2016 |
||||
list=$(jq -r '.scripts | keys[] as $key | .[$key]' < package.json) |
||||
printf "#!/bin/bash\n%s\n" "$list" | shellcheck - |
Loading…
Reference in new issue