mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Updated SC2233 (markdown)
@@ -1,4 +1,4 @@
|
|||||||
## Remove superfluous `(..)` around condition.
|
## Remove superfluous `(..)` around condition to avoid subshell overhead.
|
||||||
|
|
||||||
### Problematic code:
|
### Problematic code:
|
||||||
|
|
||||||
@@ -36,7 +36,9 @@ Just delete the surrounding `(..)` since they serve no purpose and only slows th
|
|||||||
|
|
||||||
### Exceptions:
|
### Exceptions:
|
||||||
|
|
||||||
None.
|
This issue only affects performance, not correctness, so it can be safely [[ignore]]d.
|
||||||
|
|
||||||
|
If you are considering doing it to stylistically match C-like languages, please note that this is not conventional and that you'd probably recommend someone use `if (1 == 2)` over `if (system("[ 1 = 2 ]"))` in C no matter which language they're used to.
|
||||||
|
|
||||||
### Related resources:
|
### Related resources:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user