refactor/lint: Add ignored shellcheck suggestions to an array#15170
Merged
laanwj merged 1 commit intobitcoin:masterfrom Jan 16, 2019
koalaman:master
Merged
refactor/lint: Add ignored shellcheck suggestions to an array#15170laanwj merged 1 commit intobitcoin:masterfrom koalaman:master
laanwj merged 1 commit intobitcoin:masterfrom
koalaman:master
Conversation
This avoids duplicating the codes between command and comments.
Contributor
|
Concept ACK |
Contributor
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
promag
reviewed
Jan 15, 2019
Contributor
promag
left a comment
There was a problem hiding this comment.
utACK.
BTW, have you verified remaining linters?
Empact
reviewed
Jan 15, 2019
| SC2148 # Tips depend on target shell and yours is unknown. Add a shebang. | ||
| SC2162 # read without -r will mangle backslashes. | ||
| SC2166 # Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. | ||
| SC2166 # Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. |
Empact
reviewed
Jan 15, 2019
| SC2230 # which is non-standard. Use builtin 'command -v' instead. | ||
| SC2236 # Don't force -n instead of ! -z. | ||
| ) | ||
| shellcheck -e "$(IFS=","; echo "${disabled[*]}")" \ |
Contributor
There was a problem hiding this comment.
nit: --exclude= would be a bit more explicit/self-documenting
Contributor
|
utACK cbd9091 - confirmed the same checks are disabled |
Contributor
Member
|
Much better! I'd still prefer a list of cases to check, instead of those to not check, but this is at least DRY. utACK cbd9091 |
laanwj
added a commit
that referenced
this pull request
Jan 16, 2019
… array cbd9091 refactor/lint: Add ignored suggestions to an array (Vidar Holen) Pull request description: By adding excluded shellcheck suggestions to an array, you can avoid the current duplication between command and comments. This ensures that they never go out of sync, makes it easier to add new ones, and improves the readability of related diffs. Tree-SHA512: 04afced1d27fda940cc5e61d7f9ed04507c8f7f7dfd0031c09898a599c6de93695923a80cb3d515a0f0bf728847592d8680c15ac2e376b48726c03ca744f13a5
laanwj
added a commit
that referenced
this pull request
Jan 21, 2019
948d8f4 lint: Enable python linters via an array (Ben Woosley) Pull request description: This assures consistent recording of the enabled linters. This applies the same fix as #15170 to lint-python.sh Tree-SHA512: 6d03f919e86e7c2465475c88b25dd84391282bcc11728078024daf0432a7dccddf9e4a2cdae35d6ef374971cb4e12f0fa21b58f757e25f2fe7c12ceb4f4b2c57
zkbot
added a commit
to zcash/zcash
that referenced
this pull request
Oct 28, 2020
Backport useful lints from upstream Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6892 - bitcoin/bitcoin#11151 - bitcoin/bitcoin#11300 - bitcoin/bitcoin@96d91b7 - bitcoin/bitcoin#12097 - bitcoin/bitcoin#12098 - bitcoin/bitcoin#12442 - bitcoin/bitcoin#12572 - bitcoin/bitcoin#12757 - bitcoin/bitcoin#11878 - bitcoin/bitcoin#12933 - bitcoin/bitcoin#12871 - bitcoin/bitcoin#12972 - bitcoin/bitcoin#13281 - bitcoin/bitcoin#13385 - bitcoin/bitcoin#13041 - bitcoin/bitcoin#13454 - bitcoin/bitcoin#13448 - bitcoin/bitcoin#13510 - bitcoin/bitcoin#13851 - bitcoin/bitcoin#13863 - bitcoin/bitcoin#14115 - bitcoin/bitcoin#14831 - bitcoin/bitcoin#15164 - bitcoin/bitcoin#15170 - bitcoin/bitcoin#15166 - bitcoin/bitcoin#16036 - bitcoin/bitcoin#16768 Several of the lints fail for our current codebase; these will be addressed in a subsequent PR.
zkbot
added a commit
to zcash/zcash
that referenced
this pull request
Nov 9, 2020
Backport useful lints from upstream Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6892 - bitcoin/bitcoin#11151 - bitcoin/bitcoin#11300 - bitcoin/bitcoin@96d91b7 - bitcoin/bitcoin#12097 - bitcoin/bitcoin#12098 - bitcoin/bitcoin#12442 - bitcoin/bitcoin#12572 - bitcoin/bitcoin#12757 - bitcoin/bitcoin#11878 - bitcoin/bitcoin#12933 - bitcoin/bitcoin#12871 - bitcoin/bitcoin#12972 - bitcoin/bitcoin#13281 - bitcoin/bitcoin#13385 - bitcoin/bitcoin#13041 - bitcoin/bitcoin#13454 - bitcoin/bitcoin#13448 - bitcoin/bitcoin#13510 - bitcoin/bitcoin#13851 - bitcoin/bitcoin#13863 - bitcoin/bitcoin#14115 - bitcoin/bitcoin#14831 - bitcoin/bitcoin#15164 - bitcoin/bitcoin#15170 - bitcoin/bitcoin#15166 - bitcoin/bitcoin#16036 - bitcoin/bitcoin#16768 - bitcoin/bitcoin#13494 Several of the lints fail for our current codebase; these will be addressed in a subsequent PR.
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Jun 28, 2021
…s to an array cbd9091 refactor/lint: Add ignored suggestions to an array (Vidar Holen) Pull request description: By adding excluded shellcheck suggestions to an array, you can avoid the current duplication between command and comments. This ensures that they never go out of sync, makes it easier to add new ones, and improves the readability of related diffs. Tree-SHA512: 04afced1d27fda940cc5e61d7f9ed04507c8f7f7dfd0031c09898a599c6de93695923a80cb3d515a0f0bf728847592d8680c15ac2e376b48726c03ca744f13a5
UdjinM6
pushed a commit
to UdjinM6/dash
that referenced
this pull request
Aug 24, 2021
948d8f4 lint: Enable python linters via an array (Ben Woosley) Pull request description: This assures consistent recording of the enabled linters. This applies the same fix as bitcoin#15170 to lint-python.sh Tree-SHA512: 6d03f919e86e7c2465475c88b25dd84391282bcc11728078024daf0432a7dccddf9e4a2cdae35d6ef374971cb4e12f0fa21b58f757e25f2fe7c12ceb4f4b2c57
Munkybooty
pushed a commit
to Munkybooty/dash
that referenced
this pull request
Aug 24, 2021
948d8f4 lint: Enable python linters via an array (Ben Woosley) Pull request description: This assures consistent recording of the enabled linters. This applies the same fix as bitcoin#15170 to lint-python.sh Tree-SHA512: 6d03f919e86e7c2465475c88b25dd84391282bcc11728078024daf0432a7dccddf9e4a2cdae35d6ef374971cb4e12f0fa21b58f757e25f2fe7c12ceb4f4b2c57
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
By adding excluded shellcheck suggestions to an array, you can avoid the current duplication
between command and comments. This ensures that they never go out of sync, makes it easier to
add new ones, and improves the readability of related diffs.