mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 11:19:45 +08:00
Created SC2282 (markdown)
27
SC2282.md
Normal file
27
SC2282.md
Normal file
@@ -0,0 +1,27 @@
|
||||
## Variable names can't start with numbers, so this is interpreted as a command.
|
||||
|
||||
### Problematic code:
|
||||
|
||||
```sh
|
||||
411toppm=true
|
||||
```
|
||||
|
||||
### Correct code:
|
||||
|
||||
```sh
|
||||
_411toppm=true
|
||||
```
|
||||
|
||||
### Rationale:
|
||||
|
||||
You appear to be assigning to a variable name that starts with a digit. This is not allowed: variables must start with A-Z, a-z or _.
|
||||
|
||||
Switch to a variable name that does not start with a digit.
|
||||
|
||||
### Exceptions:
|
||||
|
||||
None
|
||||
|
||||
### Related resources:
|
||||
|
||||
* Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc!
|
Reference in New Issue
Block a user