-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Improve shellcheck coverage #1596
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
683de7f
to
47520fa
Compare
693dba4
to
4427fb0
Compare
* Switches to using `git ls-files` instead of a hardcoded list of scripts to lint (shellcheck doesn't support recursively scanning for scripts itself). This means a few files that were not previously linted now are, so need fixes. * Adds a `.shellcheckrc` which is used to enable optional shellcheck checks via `enable=all`. Most of these checks either already passed or have been fixed in this PR - however, a few others need a closer look so have been disabled for now to reduce the size of this PR. * As part of doing this I discovered an NLTK bug with setting `NLTK_DATA` after #1595, which has now been fixed. Since that change was not yet released, I've not mentioned the fix here in the changelog.
4427fb0
to
f043f25
Compare
dzuelke
approved these changes
Jun 13, 2024
Co-authored-by: David Zülke <dzuelke@salesforce.com>
Co-authored-by: David Zülke <dzuelke@salesforce.com>
Merged
edmorley
added a commit
that referenced
this pull request
Oct 3, 2024
In #1596 a number of optional Shellcheck rules were enabled. However, there were some which were deferred due to the number of fixes required, and so were left disabled via the `.shellcheckrc` file. In order that we can get the benefit of these rules for new code, I've removed the global disabling in favour of per file or per line `disable` directives (and in some cases, fixing outright). These can then be fixed piecemeal as refactorings occur later. Of note, one of these optional Shellcheck rules (SC2311) would have saved me a fair amount of debugging time earlier today in the new Python version handling implementation. GUS-W-16898648.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
git ls-files
instead of a hardcoded list of scripts to lint (shellcheck doesn't support recursively scanning for scripts itself). This means a few files that were not previously linted now are, so need fixes..shellcheckrc
which is used to enable optional shellcheck checks viaenable=all
. Most of these checks either already passed or have been fixed in this PR - however, a few others need a closer look so have been disabled for now to reduce the size of this PR.NLTK_DATA
after Misc bash script refactoring #1595, which has now been fixed. Since that change was not yet released, I've not mentioned the fix here in the changelog.Shellcheck's optional checks as of v0.10.0:
See also:
https://github.com/koalaman/shellcheck/blob/master/shellcheck.1.md