#3542·shellcheck

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

Here's a snippet or screenshot that shows a potential problem:

bash
#!/bin/bash

for file in **/*; do
        echo "$file"
done

Here'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.