ShellCheck, a static analysis tool for shell scripts
GNU General Public License v3.0
36.45k
stars
1.78k
forks
source link
SC2282 - variables starting with numbers aren't flagged as errors if done in arithmetic context #2958
Open
RVC2020 opened 7 months ago
For bugs
shellcheck --version
or "online"): 0.10.0For new checks and feature suggestions
Here's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
In test.sh line 3: 2num=$((10+1)) ^------------^ SC2282 (error): Variable names can't start with numbers, so this is interpreted as a command.
Here's what I wanted or expected to see:
1num also be flagged as an error under SC2282,