Skip to content

Commit

Permalink
ci: fix shell check lint
Browse files Browse the repository at this point in the history
  • Loading branch information
attilasomogyi committed Mar 19, 2023
1 parent f4d23c7 commit 3f9beb0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .shellcheckrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
disable=SC2155,SC1090
disable=SC2155,SC1090
severity=warning
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"doc": "docs"
},
"scripts": {
"test": "sh ./scripts/ci/*.sh",
"test": "for script in $(ls ./scripts/ci/*.sh); do sh -e $script; done",
"prepare": "is-ci || husky install"
},
"keywords": [
Expand All @@ -22,7 +22,7 @@
"license": "MIT",
"devDependencies": {
"cspell": "latest",
"husky": "latest",
"husky": "^8.0.0",
"is-ci": "latest",
"prettier": "latest",
"@commitlint/config-conventional": "latest"
Expand Down
12 changes: 11 additions & 1 deletion scripts/ci/shellcheck.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
#!/usr/bin/env sh
set -e

find . -name '*.sh' -exec shellcheck {} \;
shellcheck_url="https://github.com/koalaman/shellcheck"

which shellcheck >/dev/null || {
echo "shellcheck not found, please install: $shellcheck_url"
exit 1
}

scripts=$(find . -name '*.sh')
for script in $scripts; do
shellcheck "$script"
done
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ has-own-prop@^2.0.0:
resolved "https://registry.yarnpkg.com/has-own-prop/-/has-own-prop-2.0.0.tgz#f0f95d58f65804f5d218db32563bb85b8e0417af"
integrity sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ==

husky@latest:
husky@^8.0.0:
version "8.0.3"
resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184"
integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==
Expand Down

0 comments on commit 3f9beb0

Please sign in to comment.