Skip to content
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

feat: implement shellcheck lints in command blocks (#191) #264

Merged
Merged
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
5a7aab3
feat: implement shellcheck lints in command blocks (#191)
thatRichman Dec 8, 2024
3ad8425
fix: apply stylistic suggestions from PR (#191)
thatRichman Dec 8, 2024
75e04c4
fix: address stylistic comments from PR (#191)
thatRichman Dec 8, 2024
a8c4d34
fix: only test for shellcheck once
thatRichman Dec 9, 2024
a36ae83
fix: address stylistic comments from PR (#191)
thatRichman Dec 10, 2024
19a6692
fix: use a random string for bash variables
thatRichman Dec 10, 2024
5a8cc11
fix: remove some suppressed lints, enable style lints
thatRichman Dec 10, 2024
c1375b9
refactor: split into smaller functions
thatRichman Dec 10, 2024
38e9994
fix: rework WDL -> bash script line mapping
thatRichman Dec 10, 2024
c0b9825
fix: make `program_exists` cross-platform
thatRichman Dec 10, 2024
1423a22
feat: add tests for shellcheck lint
thatRichman Dec 10, 2024
f7c5431
fix: prefix all bash vars with 'WDL'
thatRichman Dec 10, 2024
05a583b
feat: add tests for shellcheck lints
thatRichman Dec 10, 2024
7cbe4ac
fix: use diagnostic terminology consistently
thatRichman Dec 11, 2024
a97fcad
fix: correct diagnostic placement algorithm
thatRichman Dec 11, 2024
405afff
fix: disable missing shellcheck diagnostic
thatRichman Dec 12, 2024
ed879c9
feat: add debug log for shellcheck process id
thatRichman Dec 12, 2024
d7382e4
feat: clarify suppressed diagnostics
thatRichman Dec 12, 2024
ce77d8a
fix: remove task definition from shellcheck exceptable nodes
thatRichman Dec 12, 2024
282a52c
fix: multiline diagnostic placement
thatRichman Dec 12, 2024
007592c
fix: clarify language for disabled diangostic
thatRichman Dec 12, 2024
ce1e69e
feat: update RULES.md and CHANGELOG.md
thatRichman Dec 12, 2024
c9fe044
fix: apply formatting rules
thatRichman Dec 13, 2024
d419085
fix: do not overquote bash vars
thatRichman Dec 13, 2024
9bcd09d
fix: apply formatting rules
thatRichman Dec 13, 2024
4215c5d
fix: diagnostic comments must be unique
thatRichman Dec 13, 2024
23dfe5a
feat: add install-shellcheck action
thatRichman Dec 13, 2024
e948c81
fix: update source.errors with new lint format
thatRichman Dec 13, 2024
b538be3
fix: add shellcheck to windows path correctly
thatRichman Dec 14, 2024
264fa71
fix: reduce false-positives by sometimes using literals
thatRichman Dec 14, 2024
698a638
feat: enable optional shellcheck lints in cli
thatRichman Dec 17, 2024
886ae2c
fix: disable install-shellcheck action
thatRichman Dec 17, 2024
3d4c32d
fix: remove shellcheck from default rules
thatRichman Dec 18, 2024
28d1071
chore: wording
thatRichman Dec 18, 2024
7edf514
chore: fmt
thatRichman Dec 18, 2024
fead4cd
chore: grammar
thatRichman Dec 18, 2024
47e911c
fix: add shellcheck lint rule to tests
thatRichman Dec 18, 2024
e83d79a
feat: add shellcheck option to gauntlet
thatRichman Dec 18, 2024
76ed909
chore: fmt
thatRichman Dec 18, 2024
91046ff
fix: undo changes to CI.yml
thatRichman Dec 18, 2024
d1bb4ae
fix: always use latest github release of shellcheck
thatRichman Dec 18, 2024
58b8d67
chore: lints
thatRichman Dec 18, 2024
5e942c5
chore: update wdl and gauntlet changelogs
thatRichman Dec 18, 2024
d8dfef1
fix: re-enable missing shellcheck diagnostic
thatRichman Dec 18, 2024
984dd70
fix: include optional rules when checking rule validity
thatRichman Dec 18, 2024
9cd70c0
chore: fmt
thatRichman Dec 18, 2024
7db4246
chore: lint
thatRichman Dec 19, 2024
7b50b5b
fix: only use shellcheck rule in arena mode
thatRichman Dec 19, 2024
3dfa8fd
chore: lint
thatRichman Dec 19, 2024
3a8e4ae
fix: re-enable shellcheck install for CI
thatRichman Dec 19, 2024
24d1114
fix: gauntlet/CHANGELOG.md description
thatRichman Dec 20, 2024
9040430
feat: add test shellcheck disable directives
thatRichman Dec 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: remove some suppressed lints, enable style lints
  • Loading branch information
thatRichman committed Dec 18, 2024
commit 5a8cc11b90498b196c565175bd0351f53c220f4d
8 changes: 3 additions & 5 deletions wdl-lint/src/rules/shellcheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,8 @@ const SHELLCHECK_BIN: &str = "shellcheck";
/// shellcheck lints that we want to suppress
const SHELLCHECK_SUPPRESS: &[&str] = &[
"1009", // the mentioned parser error was in...
"1072", // Unexpected..
"1072", // Unexpected
"1083", // this {/} is literal
"2043", // this loop will only ever run once for constant value
"2050", // This expression is constant
"2157", // Argument to -n is always true due to literal strings
"2193", // The arguments to this comparison can never be equal
];

/// ShellCheck: var is referenced by not assigned.
Expand Down Expand Up @@ -97,6 +93,8 @@ fn run_shellcheck(command: &str) -> Result<Vec<ShellCheckDiagnostic>> {
"json",
"-e",
&SHELLCHECK_SUPPRESS.join(","),
"-S",
"style",
"-",
])
.stdin(Stdio::piped())
Expand Down