Feature request: warning when globstar seems to be used but not set
Author: dhouckCreated Sep 25, 2026Updated Sep 25, 2026
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 a potential problem:
#!/bin/bash
for file in **/*; do
echo "$file"
doneHere's what shellcheck currently says:
No issues detected
Here's what I wanted to see:
A warning that ** mostly makes sense with the globstar option, which the script does not enable.
This could have false positives (this is valid code thatʼs just equivalent to * without globstar), so it should just be a warning not an error. But it definitely should be warned about, because there isnʼt much reason to use ** without globstar.
Source: koalaman/shellcheck