mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
e5682eec38
* 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)
15 lines
368 B
Bash
Executable File
15 lines
368 B
Bash
Executable File
#!/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 -
|