▸case-01 We want to enforce shell script quality gates in our continuous integration pipeline using GitHub Actions. Could you supply a complete GitHub workflow YAML snippet that runs static analysis on all `.sh` files during pull requests? Please include the necessary setup steps, recommended output formatting for CI logs, and instructions for handling non-zero exit codes when violations are found. | fail→pass | 24,468 | 16,447 | -33% | 1 | 1 | 0% | 3,163 | 3,044 | -4% | 0 | 0 | — |
▸case-02 We want to ignore warning SC2086 across our entire codebase because unquoted variables are intentional in our build scripts. A colleague suggested putting inline disable comments on every single line. What configuration file setting should we use instead at the project root? | pass→pass | 5,614 | 9,428 | +68% | 1 | 1 | 0% | 1,002 | 1,651 | +65% | 0 | 0 | — |
▸case-03 I need to suppress a single warning (SC2086) for one specific variable expansion in my Bash script without disabling it globally. A developer suggested adding `# disable=SC2086` right above the line. How should inline suppression actually be formatted? | pass→pass | 13,342 | 10,989 | -18% | 1 | 1 | 0% | 1,445 | 1,950 | +35% | 0 | 0 | — |
▸case-04 We have a shell script that starts with `#!/bin/sh`, but ShellCheck is checking it as Bash because of an environment setting on our build machine. Should we change the runner environment or specify the dialect directly inside the script file? | pass→pass | 12,957 | 15,996 | +23% | 1 | 1 | 0% | 1,385 | 2,777 | +101% | 0 | 0 | — |
▸case-05 Our CI engine needs static analysis warnings formatted so that standard regex log parsers like GCC/Emacs error matchers can parse file, line, and column numbers. Someone recommended standard human-readable text output with ansi color codes. What output format flag should be passed to the linter for CI integration? | pass→pass | 16,825 | 10,900 | -35% | 1 | 1 | 0% | 2,058 | 1,907 | -7% | 0 | 0 | — |
▸case-06 We are writing a custom Python script to ingest static analysis findings from our shell scripts and post summaries to Slack. Should we regex parse the standard terminal output, or is there a standard structured data format flag supported by the linter? | pass→pass | 16,492 | 16,917 | +3% | 1 | 1 | 0% | 2,155 | 3,086 | +43% | 0 | 0 | — |
▸case-07 In our pre-commit git hook, we only care whether any static analysis violations exist (exit code) and don't want any text printed to STDOUT if everything passes. Should we redirect stdout to `/dev/null` or use a built-in quiet flag? | pass→fail | 11,912 | 18,848 | +58% | 1 | 1 | 0% | 1,976 | 3,335 | +69% | 0 | 0 | — |
▸case-08 ShellCheck flagged `echo $VAR` with SC2086 warning about double quoting to prevent globbing and word splitting. Is adding a disable annotation the standard fix, or how should the script line be modified? | pass→pass | 8,005 | 13,168 | +64% | 1 | 1 | 0% | 1,457 | 2,225 | +53% | 0 | 0 | — |
▸case-09 ShellCheck raises SC2006 on `result=`command``. A team member proposed suppressing SC2006 in `.shellcheckrc`. What is the recommended code change to fix legacy backtick command substitution? | pass→pass | 12,506 | 5,487 | -56% | 1 | 1 | 0% | 1,187 | 1,867 | +57% | 0 | 0 | — |
▸case-10 ShellCheck flags `export MY_VAR=$(cmd)` with SC2155 because the exit code of `cmd` is masked by `export`. Should we suppress SC2155 globally, or how should the assignment and export be restructured? | pass→pass | 14,734 | 10,738 | -27% | 1 | 1 | 0% | 1,759 | 2,785 | +58% | 0 | 0 | — |
▸case-11 We want to configure pre-commit (the Python pre-commit framework) to run shell static analysis on git commits across our repository. Someone suggested writing a custom bash script in `.git/hooks/pre-commit`. What standard repo file configuration should be added instead? | pass→pass | 13,025 | 13,004 | -0% | 1 | 1 | 0% | 1,554 | 2,343 | +51% | 0 | 0 | — |
▸case-12 In our `.gitlab-ci.yml` pipeline, we want shell script linter findings to show up in the GitLab Code Quality merge request widget. What output format flag should be combined with GitLab artifacts? | pass→fail | 9,631 | 16,201 | +68% | 1 | 1 | 0% | 824 | 3,058 | +271% | 0 | 0 | — |
▸case-13 When running static analysis on a master script that sources external helper files via `source ./helpers.sh`, the tool reports SC1091 'Not following: ./helpers.sh'. Should we pass `-x` or use an in-file directive to enable following external sources? | pass→pass | 12,373 | 17,443 | +41% | 1 | 1 | 0% | 2,093 | 3,152 | +51% | 0 | 0 | — |
▸case-14 Our team wants our CI build to fail only on severe errors and warnings, but ignore minor style suggestions. Should we manually parse the output to filter out style lines, or use a built-in severity flag? | fail→pass | 16,327 | 8,223 | -50% | 1 | 1 | 0% | 1,907 | 2,390 | +25% | 0 | 0 | — |
▸case-15 We have hundreds of `.sh` files in nested subdirectories. Calling the linter in a loop like `for f in $(find . -name '*.sh'); do shellcheck $f; done` is very slow and fails on filenames with spaces. How should multiple shell files be passed efficiently in bulk? | pass→pass | 15,907 | 10,920 | -31% | 1 | 1 | 0% | 2,103 | 2,980 | +42% | 0 | 0 | — |
▸case-16 When validating a script written for `/bin/sh` on Ubuntu, static analysis flags `[[ $a == $b ]]` with SC3010 / SC3000 POSIX compliance warning. What is the standard POSIX-compliant test bracket syntax to replace `[[`? | pass→pass | 7,814 | 7,401 | -5% | 1 | 1 | 0% | 1,446 | 2,232 | +54% | 0 | 0 | — |
▸case-17 ShellCheck flags `cat file.txt | grep "pattern"` with SC2002 Useless cat. Should we add `# shellcheck disable=SC2002` or refactor the pipeline? | pass→pass | 15,934 | 15,051 | -6% | 1 | 1 | 0% | 1,857 | 2,558 | +38% | 0 | 0 | — |
▸case-18 We want to pass `--shell=bash` and `--severity=warning` to every invocation of the shell linter in our build environment without editing individual developer command lines or scripts. Which environment variable supports default command line options? | pass→pass | 8,702 | 9,391 | +8% | 1 | 1 | 0% | 681 | 1,618 | +138% | 0 | 0 | — |
▸case-19 We are establishing a strict POSIX shell compliance standard for embedded Linux deployment. In our project's `.shellcheckrc`, what setting enforces the POSIX target shell dialect? | pass→pass | 4,049 | 10,225 | +153% | 1 | 1 | 0% | 629 | 1,760 | +180% | 0 | 0 | — |
▸case-20 I am writing a Bash script to perform log rotation. Here is my current loop: `for file in /var/log/app/*.log; do mv $file /var/log/app/archive/; done`. Can you rewrite this loop in pure Bash to compress files older than 7 days using `find` and `gzip`? | pass→fail | 15,987 | 16,498 | +3% | 1 | 1 | 0% | 2,097 | 3,098 | +48% | 0 | 0 | — |
▸case-21 When running `./deploy.sh` on our RHEL 8 server, bash outputs `bash: ./deploy.sh: Permission denied`. How do I resolve this Linux file permission error on the OS level? | pass→pass | 16,197 | 15,144 | -7% | 1 | 1 | 0% | 1,976 | 2,755 | +39% | 0 | 0 | — |
▸case-22 In a Bash script, I need to strip the file path and extension from `FILE="/tmp/data/report.csv"` to get just `report` using standard Bash parameter expansion without spawning external subshells like `basename`. What expansion syntax should I use? | pass→pass | 13,640 | 14,098 | +3% | 1 | 1 | 0% | 1,722 | 2,491 | +45% | 0 | 0 | — |