Revert most of "Fix linting errors that snuck in."#2000
Merged
NoahGorny merged 1 commit intoBash-it:masterfrom Jan 1, 2022
Merged
Revert most of "Fix linting errors that snuck in."#2000NoahGorny merged 1 commit intoBash-it:masterfrom
NoahGorny merged 1 commit intoBash-it:masterfrom
Conversation
This reverts commit 2c8ee40. - _Shellcheck_ documentation for the [`source-path`]( https://github.com/koalaman/shellcheck/wiki/Directive#source-path ) directive indicates this is correct usage. We're `source`ing the `bash-preexec.sh` file from inside the `vendor/github.com/rcaloras/bash-preexec` directory. If we used the [`source`]( https://github.com/koalaman/shellcheck/wiki/Directive#source ) directive, then the full complete path to the file itself would need to be specified. - Fix `disable=1090` to `disable=SC1090` and remove duplicate lines since this `shellcheck` directive will apply to the entire if-ladder. - Disabling `SC2154` is almost never appropriate. In this case, several `_git_bash_completion*` variables are expressly assigned in this file, so there is no "unknown" to ignore. Aside: the `${!_git_bash_completion@}` construct will expand to all variables starting with the previx `_git_bash_completion`, so this line is just a shorthand way to clear all our variables concisely without forgetting any.
Contributor
Author
|
@cornfeedhobo, you may have an old or broken |
NoahGorny
approved these changes
Jan 1, 2022
Member
NoahGorny
left a comment
There was a problem hiding this comment.
Hmm, seems like we should always check with the newest shellcheck (or the one we use in the CI at least)
This file contains hidden or 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
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.
Description
This reverts most of commit 2c8ee40.
Motivation and Context
source-pathdirective indicates this is correct usage. We'resourceing thebash-preexec.shfile from inside thevendor/github.com/rcaloras/bash-preexecdirectory. If we used thesourcedirective, then the full complete path to the file itself would need to be specified.disable=1090todisable=SC1090and remove duplicate lines since thisshellcheckdirective will apply to the entire if-ladder.SC2154is almost never appropriate. In this case, several_git_bash_completion*variables are expressly assigned in this file, so there is no "unknown" to ignore.Aside: the
${!_git_bash_completion@}construct will expand to all variables starting with the prefix_git_bash_completion, so this line is just a shorthand way to clear all our variables concisely without forgetting any.Types of changes
Checklist:
clean_files.txtand formatted it usinglint_clean_files.sh.