-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Delete .shellcheckrc
#1947
Delete .shellcheckrc
#1947
Conversation
0a4ebe3
to
aaaae4d
Compare
@NoahGorny, can you take a look at this one? I'd like to get this merged before I do anything else. |
2b081e0
to
9c57ed5
Compare
Hi @gaelicWizard- great work! |
8cf1e89
to
ecfbb2d
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.
I had only a comment, otherwise lgtm
Declare `locals` at the top of the function
Match the style of the existing code
65aea49
to
6ce9911
Compare
We assign a large number of variables here and they may or may not be used anywhere else, so disable SC2034 for this file (only). Alsö disable SC2005 as the functions in this file were written before `printf` was invented and have to do some fancy metascripting to get escape sequences interpreted reliably. I’m not smart enough to fix this to use `printf`, so leave it for now.
Each one of these themes will need it’s own fix for SC2154, possibly upstream. Due to the way themes are, it's entirely normal to have a *lot* of false positives for SC2034. So much so, that I have to admit that it is probably just not worth linting for SC2034 despite my dislike of blanket ignore rules.
Each one of these themes will need it’s own fix for SC2154, possibly upstream. Due to the way themes are, it's entirely normal to have a *lot* of false positives for SC2034. So much so, that I have to admit that it is probably just not worth linting for SC2034 despite my dislike of blanket ignore rules.
6ce9911
to
5023b20
Compare
* CI: disable Ubuntu 16.04 as it's EOL https://github.blog/changelog/2021-04-29-github-actions-ubuntu-16-04-lts-virtual-environment-will-be-removed-on-september-20-2021/ * main: lint false positive * install: lint * plugins/cmd-returned-notify: don't `export` * plugins/xterm: lint * plugins/git: lint * plugins/goenv: lint * plugins/alias-completion: lint false positives * plugins/alias-completion: fix SC2155, SC2154 Declare `locals` at the top of the function * completion: lint completions using `bash_completion` functions Match the style of the existing code * completion/knife: lint false positives * completion/knife: lint * completion/sdkman: lint * completion/composer: lint * Move `.shellcheckrc` under `themes/` * lib/theme: fix SC2155, SC2154, SC2034 * lib/colors: don't warn on unused variables We assign a large number of variables here and they may or may not be used anywhere else, so disable SC2034 for this file (only). Alsö disable SC2005 as the functions in this file were written before `printf` was invented and have to do some fancy metascripting to get escape sequences interpreted reliably. I’m not smart enough to fix this to use `printf`, so leave it for now. * themes/agnoster: lint * themes: disable SC2154 for colors Each one of these themes will need it’s own fix for SC2154, possibly upstream. Due to the way themes are, it's entirely normal to have a *lot* of false positives for SC2034. So much so, that I have to admit that it is probably just not worth linting for SC2034 despite my dislike of blanket ignore rules. * themes: disable SC2154, fix SC2155 Each one of these themes will need it’s own fix for SC2154, possibly upstream. Due to the way themes are, it's entirely normal to have a *lot* of false positives for SC2034. So much so, that I have to admit that it is probably just not worth linting for SC2034 despite my dislike of blanket ignore rules. * Delete `.shellcheckrc` * remove executable bit
Description
Turns out that there is a file in the repo root which disabled checks for unbound variables. This fixes #1923.
Motivation and Context
I've done a lot of work finding and fixing these problems...which would have been detected by shellcheck if it hadn't been disabled.
shellcheck
to detect because the theme doesn't use what it sets, but the prompt does.nounset
, and loud errors withnounset
Since my
unbound
branch was already merged, there's only a couple that are missing SC2154 (from already-linted files). I've alsö disabled SC2034 in the colors lib, since that file is basically entirely that and SC2005.I've alsö gone through and fixed the CI linter for already-linted themes, plugins, and completions, with the exception of unbound parameters in themes. For the themes, I've just disabled the message to be fixed later.
How Has This Been Tested?
I've run
shellcheck
myself. All CI tests pass, CI linter passes, CI formatter comes back clean.Types of changes
Checklist:
clean_files.txt
and formatted it usinglint_clean_files.sh
.