-
Notifications
You must be signed in to change notification settings - Fork 247
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
add github action to perform shellcheck on scripts #465
base: master
Are you sure you want to change the base?
Conversation
*) continue ;; | ||
esac | ||
echo "Checking ${shellscript} with shellcheck:" | ||
shellcheck -s sh "${shellscript}" || true |
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.
this ignores all errors, so this job will never fail. since it will always be green (in the actions tab, and in PRs), no one will ever look at it. so like, what's the point ? :)
i think you want to set ret=0
at the top of the file, change this true
to ret=1
, and then exit ${ret}
at the bottom.
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.
Ultimately, my thought is to change the "true" to "exit" to bail immediately once a script fails shellcheck, but I can't do that yet because I'll need to figure out which messages are false positives so they can be turned off in a configuration file or in the source files themselves.
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.
none of the CI checks block merges or pushes, so i think it'd be OK to just land this as-is. but i'm fine with an exit 0
at the end of the script with a TODO
explaining why it's ignoring the $ret
if you want to go that route.
c3bb962
to
6dd9397
Compare
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.
should prob resolve all open conversations ...
No description provided.