-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add shellcheck to circleci #2835
Conversation
bc900ac
to
8417616
Compare
8417616
to
08bd06d
Compare
@@ -94,6 +93,7 @@ hey -n $numReqs -c $numParallel -m POST \ | |||
| tee -a BENCHMARKS.md | |||
|
|||
|
|||
# shellcheck disable=SC2006 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I set it to disable because it is a backtick that is written in markdown.
https://github.com/koalaman/shellcheck/wiki/SC2006
@@ -368,7 +368,6 @@ EOF | |||
PROJECT_NAME="hydra" | |||
OWNER=ory | |||
REPO="hydra" | |||
BINARY=hydra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was an unused variable, so it was removed.
https://github.com/koalaman/shellcheck/wiki/SC2034
@@ -56,7 +56,6 @@ hydra clients create \ | |||
--endpoint http://localhost:9001 | |||
|
|||
echo "Generating initial access tokens for token introspection benchmark" | |||
authToken=$(hydra token client --endpoint http://localhost:9000 --client-id $clientId --client-secret $clientSecret) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was an unused variable, so it was removed.
https://github.com/koalaman/shellcheck/wiki/SC2034
@@ -3,4 +3,5 @@ | |||
set -euxo pipefail | |||
cd "$( dirname "${BASH_SOURCE[0]}" )/../.." | |||
|
|||
docker-compose -f quickstart.yml -f quickstart-postgres.yml -f test/conformance/docker-compose.yml up "${1:-}" -d | |||
# shellcheck disable=SC2086 | |||
docker-compose -f quickstart.yml -f quickstart-postgres.yml -f test/conformance/docker-compose.yml up ${1:-} -d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used double-quote, but it had unnecessary empty characters, so I disabled SC2086.
↓ this
docker-compose -f quickstart.yml -f quickstart-postgres.yml -f test/conformance/docker-compose.yml up '' -d
93ba97f
to
a27e282
Compare
@@ -1,6 +1,7 @@ | |||
#!/bin/bash | |||
|
|||
source $HOME/.profile | |||
# shellcheck disable=SC1090,SC1091 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I set it to disable because it was a non-existent file when shellcheck is running.
https://github.com/koalaman/shellcheck/wiki/SC1090
https://github.com/koalaman/shellcheck/wiki/SC1091
Shellcheck checks all passed, but the prettier checks don't seem to pass 🤔
Can I ignore the prettier check, since it seems to have failed in other PRs? |
Run |
Codecov Report
@@ Coverage Diff @@
## master #2835 +/- ##
=======================================
Coverage 49.87% 49.87%
=======================================
Files 236 236
Lines 14974 14974
=======================================
Hits 7469 7469
Misses 6843 6843
Partials 662 662 Continue to review full report at Codecov.
|
Thankyou @aeneasr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!
Add shellcheck to the ci pipeline for testing and security improvements.
Related issue(s)
Closes #2832
Checklist
introduces a new feature.
contributing code guidelines.
vulnerability. If this pull request addresses a security. vulnerability, I
confirm that I got green light (please contact
security@ory.sh) from the maintainers to push
the changes.
works.
Further Comments
I have confirmed that all the parts pointed out by shellcheck have been fixed in my local environment.