1 Commits

Author SHA1 Message Date
dependabot[bot]
abc79b730a Bump actions/download-artifact from 4 to 5
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-06 08:59:35 +00:00
7 changed files with 56 additions and 41 deletions

27
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,27 @@
#### For bugs
- Rule Id (if any, e.g. SC1000):
- My shellcheck version (`shellcheck --version` or "online"):
- [ ] The rule's wiki page does not already cover this (e.g. https://shellcheck.net/wiki/SC2086)
- [ ] I tried on https://www.shellcheck.net/ and verified that this is still a problem on the latest commit
#### For new checks and feature suggestions
- [ ] https://www.shellcheck.net/ (i.e. the latest commit) currently gives no useful warnings about this
- [ ] I searched through https://github.com/koalaman/shellcheck/issues and didn't find anything related
#### Here's a snippet or screenshot that shows the problem:
```sh
#!/your/interpreter
your script here
```
#### Here's what shellcheck currently says:
#### Here's what I wanted or expected to see:

View File

@@ -48,7 +48,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
- name: Install dependencies
run: |
@@ -77,7 +77,7 @@ jobs:
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
- name: Build source
run: |
@@ -100,7 +100,7 @@ jobs:
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
- name: Work around GitHub permissions bug
run: chmod +x *.bin/*/shellcheck*
@@ -135,7 +135,7 @@ jobs:
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
- name: Upload to GitHub
env:

4
.gitignore vendored
View File

@@ -14,7 +14,6 @@ cabal.sandbox.config
cabal.config
cabal.project.freeze
.stack-work
stack.yaml.lock
### Snap ###
/snap/.snapcraft/
@@ -23,6 +22,3 @@ stack.yaml.lock
/prime/
*.snap
/dist-newstyle/
### misc ###
/shellcheck.1

View File

@@ -2349,8 +2349,6 @@ prop_checkFunctionsUsedExternally8 =
verifyTree checkFunctionsUsedExternally "foo() { :; }; command sudo foo"
prop_checkFunctionsUsedExternally9 =
verifyTree checkFunctionsUsedExternally "foo() { :; }; exec -c doas foo"
prop_checkFunctionsUsedExternally10 =
verifyTree checkFunctionsUsedExternally "foo() { :; }; timeout -p 10 foo"
checkFunctionsUsedExternally params t =
runNodeAnalysis checkCommand params t
where
@@ -2378,7 +2376,6 @@ checkFunctionsUsedExternally params t =
"run0" -> firstNonFlag
"xargs" -> firstNonFlag
"tmux" -> firstNonFlag
"timeout" -> take 1 $ drop 1 $ dropFlags argAndString
"ssh" -> take 1 $ drop 1 $ dropFlags argAndString
"find" -> take 1 $ drop 1 $
dropWhile (\x -> fst x `notElem` findExecFlags) argAndString

View File

@@ -224,9 +224,9 @@ makeParameters spec = params
hasPipefail =
case shellType params of
Bash -> isOptionSet "pipefail" root
Dash -> isOptionSet "pipefail" root
Dash -> True
BusyboxSh -> isOptionSet "pipefail" root
Sh -> isOptionSet "pipefail" root
Sh -> True
Ksh -> isOptionSet "pipefail" root,
hasExecfail =
case shellType params of

View File

@@ -148,8 +148,8 @@ prop_checkBashisms53 = verifyNot checkBashisms "#!/bin/sh\nprintf -- -f\n"
prop_checkBashisms54 = verify checkBashisms "#!/bin/sh\nfoo+=bar"
prop_checkBashisms55 = verify checkBashisms "#!/bin/sh\necho ${@%foo}"
prop_checkBashisms56 = verifyNot checkBashisms "#!/bin/sh\necho ${##}"
prop_checkBashisms57 = verifyNot checkBashisms "#!/bin/dash\nulimit -m unlimited"
prop_checkBashisms58 = verify checkBashisms "#!/bin/sh\nulimit -x unlimited"
prop_checkBashisms57 = verifyNot checkBashisms "#!/bin/dash\nulimit -c 0"
prop_checkBashisms58 = verify checkBashisms "#!/bin/sh\nulimit -c 0"
prop_checkBashisms59 = verify checkBashisms "#!/bin/sh\njobs -s"
prop_checkBashisms60 = verifyNot checkBashisms "#!/bin/sh\njobs -p"
prop_checkBashisms61 = verifyNot checkBashisms "#!/bin/sh\njobs -lp"
@@ -175,7 +175,7 @@ prop_checkBashisms80 = verifyNot checkBashisms "#!/bin/sh\nhash -r"
prop_checkBashisms81 = verifyNot checkBashisms "#!/bin/dash\nhash -v"
prop_checkBashisms82 = verifyNot checkBashisms "#!/bin/sh\nset -v +o allexport -o errexit -C"
prop_checkBashisms83 = verifyNot checkBashisms "#!/bin/sh\nset --"
prop_checkBashisms84 = verifyNot checkBashisms "#!/bin/sh\nset -o pipefail"
prop_checkBashisms84 = verify checkBashisms "#!/bin/sh\nset -o pipefail"
prop_checkBashisms85 = verify checkBashisms "#!/bin/sh\nset -B"
prop_checkBashisms86 = verifyNot checkBashisms "#!/bin/dash\nset -o emacs"
prop_checkBashisms87 = verify checkBashisms "#!/bin/sh\nset -o emacs"
@@ -383,8 +383,8 @@ checkBashisms = ForShell [Sh, Dash, BusyboxSh] $ \t -> do
beginsWithDoubleDash = (`matches` mkRegex "^--.+$")
longOptions = Set.fromList
[ "allexport", "errexit", "ignoreeof", "monitor", "noclobber"
, "noexec", "noglob", "nolog", "notify" , "nounset", "pipefail"
, "verbose", "vi", "xtrace" ]
, "noexec", "noglob", "nolog", "notify" , "nounset", "verbose"
, "vi", "xtrace" ]
bashism t@(T_SimpleCommand id _ (cmd:rest)) =
let name = fromMaybe "" $ getCommandName t
@@ -446,12 +446,7 @@ checkBashisms = ForShell [Sh, Dash, BusyboxSh] $ \t -> do
("readonly", Just ["p"]),
("trap", Just []),
("type", Just $ if isBusyboxSh then ["p"] else []),
("ulimit",
Just $
if isDash
then ["H", "S", "a", "c", "d", "f", "l", "m", "n", "p", "r", "s", "t", "v", "w"]
else ["H", "S", "a", "c", "d", "f", "n", "s", "t", "v"] -- POSIX.1-2024
),
("ulimit", if isDash then Nothing else Just ["f"]),
("umask", Just ["S"]),
("unset", Just ["f", "v"]),
("wait", Just [])
@@ -488,7 +483,7 @@ checkBashisms = ForShell [Sh, Dash, BusyboxSh] $ \t -> do
"BASH_ARGV", "BASH_ARGV0", "BASH_CMDS", "BASH_COMMAND",
"BASH_EXECUTION_STRING", "BASH_LINENO", "BASH_REMATCH", "BASH_SOURCE",
"BASH_SUBSHELL", "BASH_VERSINFO", "EPOCHREALTIME", "EPOCHSECONDS",
"FUNCNAME", "GROUPS", "MAPFILE"
"FUNCNAME", "GROUPS", "MACHTYPE", "MAPFILE"
]
bashDynamicVars = [ "RANDOM", "SECONDS" ]
dashVars = [ "_" ]

View File

@@ -104,31 +104,31 @@ commonCommands = [
"compress", "continue", "cp", "crontab", "csplit", "ctags", "cut",
"cxref", "date", "dd", "delta", "df", "diff", "dirname", "dot",
"du", "echo", "ed", "env", "eval", "ex", "exec", "exit", "expand",
"export", "expr", "fc", "fg", "file", "find", "fold", "fuser",
"gencat", "get", "getconf", "getopts", "gettext", "grep", "hash",
"export", "expr", "fc", "fg", "file", "find", "fold", "fort77",
"fuser", "gencat", "get", "getconf", "getopts", "grep", "hash",
"head", "iconv", "ipcrm", "ipcs", "jobs", "join", "kill", "lex",
"link", "ln", "locale", "localedef", "logger", "logname", "lp",
"ls", "m4", "mailx", "make", "man", "mesg", "mkdir", "mkfifo",
"more", "msgfmt", "mv", "newgrp", "ngettext", "nice", "nl", "nm",
"nohup", "od", "paste", "patch", "pathchk", "pax", "pr", "printf",
"prs", "ps", "pwd", "read", "readlink", "readonly", "realpath",
"renice", "return", "rm", "rmdel", "rmdir", "sact", "sccs", "sed",
"set", "sh", "shift", "sleep", "sort", "split", "strings", "strip",
"stty", "tabs", "tail", "talk", "tee", "test", "time", "timeout",
"times", "touch", "tput", "tr", "trap", "tsort", "tty", "type",
"ulimit", "umask", "unalias", "uname", "uncompress", "unexpand",
"unget", "uniq", "unlink", "unset", "uucp", "uudecode", "uuencode",
"uustat", "uux", "val", "vi", "wait", "wc", "what", "who", "write",
"xargs", "xgettext", "yacc", "zcat"
"more", "mv", "newgrp", "nice", "nl", "nm", "nohup", "od", "paste",
"patch", "pathchk", "pax", "pr", "printf", "prs", "ps", "pwd",
"qalter", "qdel", "qhold", "qmove", "qmsg", "qrerun", "qrls",
"qselect", "qsig", "qstat", "qsub", "read", "readonly", "renice",
"return", "rm", "rmdel", "rmdir", "sact", "sccs", "sed", "set",
"sh", "shift", "sleep", "sort", "split", "strings", "strip", "stty",
"tabs", "tail", "talk", "tee", "test", "time", "times", "touch",
"tput", "tr", "trap", "tsort", "tty", "type", "ulimit", "umask",
"unalias", "uname", "uncompress", "unexpand", "unget", "uniq",
"unlink", "unset", "uucp", "uudecode", "uuencode", "uustat", "uux",
"val", "vi", "wait", "wc", "what", "who", "write", "xargs", "yacc",
"zcat"
]
nonReadingCommands = [
"alias", "basename", "bg", "cal", "cd", "chgrp", "chmod", "chown",
"cp", "du", "echo", "export", "fg", "fuser", "getconf",
"getopt", "getopts", "ipcrm", "ipcs", "jobs", "kill", "ln", "ls",
"locale", "mv", "printf", "ps", "pwd", "readlink", "realpath",
"renice", "rm", "rmdir", "set", "sleep", "touch", "trap", "ulimit",
"unalias", "uname"
"locale", "mv", "printf", "ps", "pwd", "renice", "rm", "rmdir",
"set", "sleep", "touch", "trap", "ulimit", "unalias", "uname"
]
sampleWords = [