Bracket Spacing in Conditional Statements Low

Omitting a space before the opening bracket in conditional statements can cause the shell to misinterpret the condition as part of the command name, leading to syntax errors or unexpected behavior. To fix this issue, always include a space between the conditional keyword (like 'if' or 'while') and the opening square bracket in conditional statements.

Detector ID
shell/bracket-spacing-in-conditional-statements@v1.0
Category
Common Weakness Enumeration (CWE) external icon
-
Tags
-