-
Notifications
You must be signed in to change notification settings - Fork 384
Add shellcheck
and pre-commit
to CI jobs
#3002
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
Merged
Merged
Changes from 25 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
bf588a2
add shellcheck and pre-commit to CI jobs
terhorstd bb00bbf
Merge remote-tracking branch 'upstream/master' into add-shellcheck-pr…
terhorstd aed74c6
enable checking more file formatting issues
terhorstd 6e0e5c4
reformatted whitespaces and newlines
terhorstd ac35773
fixed numerous quotes and plain bugs found by shellcheck
terhorstd d9e7231
add shellcheck, pre-commit-hooks and cppcheck as build prerequisites
terhorstd 12d79b4
add CI check for Windows line endings CRLF
terhorstd 8fddc68
fix run_examples search mechanism
terhorstd 42765f6
attempt to fix missing shellcheck input file
terhorstd 6f1b088
fix return code of check_forbidden_types.sh
terhorstd 6678863
try argument with koalaman/shellcheck-precommit
terhorstd 9286262
notice incoherent shellcheck file lists
terhorstd 24d4a39
fix typo
terhorstd 26456a7
fix undefined variable in junit_xml.sh
terhorstd ff38aad
partial pre-commit autoupdate
terhorstd a69ce17
improved comment
terhorstd f7e9464
add workaround for missing 'find -printf' on MacOS
terhorstd 4ea5f00
added extra explanation for future me
terhorstd 9571b05
Fix typo in comment
heplesser cd2484c
more fixes of shell quoting and escaping for install scripts
terhorstd a8fa1a9
Merge remote-tracking branch 'refs/remotes/origin/add-shellcheck-prec…
terhorstd efdf4c8
Merge remote-tracking branch 'upstream/master' into add-shellcheck-pr…
terhorstd 6f937eb
change quoting and reporting of library install paths
terhorstd b9025f7
change hardcoded gtime path on Darwin to $(which …)
terhorstd ec854ca
Merge branch 'master' into add-shellcheck-precommit
terhorstd 85e9071
bump ubuntu to 22.04
terhorstd 7ad9db6
Merge branch 'master' into add-shellcheck-precommit
terhorstd 37f8bc5
Merge remote-tracking branch 'origin/add-shellcheck-precommit' into a…
terhorstd 59e707d
fix typo in workflow
terhorstd d3a8a3c
revert quoting in github expression syntax
terhorstd edb0009
added diffs from developers without pre-commit
terhorstd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,4 +34,3 @@ duplicateCondition:./ | |
nullPointer:./ | ||
missingInclude:./ | ||
uninitvar:./ | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,3 @@ level: warning | |
nonword: true | ||
tokens: | ||
- '\w+\s&\s\w+' | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,3 @@ tokens: | |
- FIXME | ||
- TODO | ||
- NOTE | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ message: "'%s' should be in sentence case" | |
level: warning | ||
scope: heading | ||
match: $sentence | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ extends: occurrence | |
scope: sentence | ||
max: 3 | ||
token: ',' | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,4 +118,3 @@ swap: | |
transmit: "'send'" | ||
utilization: "'use'" | ||
utilize: "'use'" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,3 @@ scope: list | |
nonword: true | ||
tokens: | ||
- '^[a-z].+' | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,3 @@ tokens: | |
- don't | ||
- doesn't | ||
- hasn't | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,3 @@ tokens: | |
- just | ||
- easily | ||
- simply | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,3 @@ scope: paragraph.rst | |
level: suggestion | ||
max: 150 | ||
token: \b(\w+)\b | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,4 +182,3 @@ tokens: | |
- woven | ||
- written | ||
- wrung | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,3 @@ tokens: | |
- hers | ||
- himself | ||
- herself | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,3 @@ scope: sentence | |
level: suggestion | ||
max: 25 | ||
token: \b(\w+)\b | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,3 @@ ignorecase: true | |
level: error | ||
tokens: | ||
- '\w+/\w+' | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ message: "Did you really mean '%s'?" | |
level: error | ||
ignore: | ||
- vocab.txt | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,4 +118,3 @@ swap: | |
with regard to: regarding | ||
with respect to: about or on | ||
with the exception of: except for | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,44 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-yaml | ||
|
||
- repo: https://github.com/gitleaks/gitleaks | ||
rev: v8.16.3 | ||
hooks: | ||
- id: gitleaks | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black", "--thirdparty", "nest"] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.7.0 | ||
hooks: | ||
- id: black | ||
language_version: python3 | ||
|
||
- repo: https://github.com/koalaman/shellcheck-precommit | ||
rev: v0.9.0 | ||
hooks: | ||
- id: shellcheck | ||
|
||
- repo: https://github.com/pre-commit/mirrors-clang-format | ||
rev: v17.0.4 | ||
hooks: | ||
- id: clang-format | ||
types_or: [c++] | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-yaml | ||
- id: forbid-submodules | ||
- id: mixed-line-ending | ||
- id: fix-byte-order-marker | ||
|
||
- repo: https://github.com/gitleaks/gitleaks | ||
rev: v8.16.3 | ||
hooks: | ||
- id: gitleaks | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black", "--thirdparty", "nest"] | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.7.0 | ||
hooks: | ||
- id: black | ||
language_version: python3 | ||
|
||
- repo: https://github.com/shellcheck-py/shellcheck-py | ||
rev: v0.10.0.1 | ||
hooks: | ||
- id: shellcheck | ||
# explicitly add input files that are not "*.sh" | ||
args: [ # note that these differ from arguments in .github/workflows/nestbuildmatrix.yml | ||
"bin/nest_vars.sh.in", # testsuite/do_tests.sh:112 requires this for `. "${PREFIX}/bin/nest_vars.sh"` | ||
] | ||
|
||
- repo: https://github.com/pre-commit/mirrors-clang-format | ||
rev: v17.0.4 | ||
hooks: | ||
- id: clang-format | ||
types_or: [c++] | ||
|
||
exclude: 'build/.*|thirdparty/.*' |
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.