mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Updated SC2054 (markdown)
@@ -19,8 +19,8 @@ You appear to have used commas to separate array elements in an array assignment
|
|||||||
|
|
||||||
In the problematic code, the first element is `-l,` with the trailing comma, and the executed command ends up being `ls -l, -d, --sort=size`.
|
In the problematic code, the first element is `-l,` with the trailing comma, and the executed command ends up being `ls -l, -d, --sort=size`.
|
||||||
|
|
||||||
In the correct code, there are no trailing commas and the command will be `ls -l -d --sort=size` as expected.
|
In the correct code, the trailing commas have been removed, and the command will be `ls -l -d --sort=size` as expected.
|
||||||
|
|
||||||
### Exceptions:
|
### Exceptions:
|
||||||
|
|
||||||
None (if you actually want a trailing comma in your strings, move it inside the quotes).
|
None (if you actually want a trailing comma in your strings, move them inside the quotes).
|
Reference in New Issue
Block a user