Medium
Showing all detectors for the Shell language with medium severity.
Variable assignment before command execution not affecting the current shell environment.
Proper syntax for variable assignments in shell scripting without spaces around the equals sign.
SSH command unexpectedly consuming stdin, causing loop iteration issues.
Use './glob' or '-- glob' to prevent dash-prefixed filenames from becoming options.
Bourne shells are sensitive to whitespace, where spaces can change script behavior.
Prefer globs or loops over ls-grep.
Avoid non-standard features in '/bin/sh' scripts.
Shell script uses a Unicode dash instead of ASCII minus, causing syntax errors in commands or expressions.
Ensure no spaces are used when assigning values in code.
Avoid using square brackets to group subexpressions inside square bracket statements.
Avoid using leading zeros in numeric literals in shell arithmetic.
Incorrect usage of '-exec' in shell scripts, leading to unexpected behavior.
Remove semicolon directly after else.
Separate array elements with spaces, not commas, in shell scripts.
Use of non-existent unary operator in test expression.
Shebang not on the first line of the script.
The problem involves replacing literal '\t' with actual tab characters using the command $(printf '\t').
Improper use of '{'' in commands affects syntax, when not treated as a separate token, it can lead to errors.
Space missing before colon in shell script.
Incorrect syntax for assigning pipeline output to a variable.
Place command terminators on the line with the here-document initiator.
It detected a test operator missing an operand.
Replace 'expr' with modern shell constructs.
A function definition lacking the opening curly brace {, causing syntax error in shell.
Missing dollar sign in arithmetic expression.
Shell script uses reversed shebang (!#) instead of the correct form (#!).
Unintended execution of command output due to unnecessary command substitution.
Shell scripts cannot natively handle decimal comparisons.
Remove semicolons immediately following the keyword 'then'.
Place ShellCheck directives before complete compound commands.
Shell script function declaration lacks required space or newline between function name and body.
Don't quote the right-hand side (RHS) of the '=~' operator, as it causes the pattern to be treated as a literal string rather than a regular expression.
Space missing before negation operator in shell command.
Preventing shell from interpreting a comparison as a file redirection.
Unexpected or incorrectly formatted shellcheck directive.
Use quoted special parameters to prevent word splitting and globbing.
Use '$(..)' for command substitution instead of '..'.
Delete the unicode non-breaking space and replace it with a regular space.
Avoid unquoted command substitutions to prevent word splitting and globbing.
Incorrect order of stdout and stderr redirection in shell scripts.
An unexpected opening parenthesis was found, revise your script to clarify its intended use.
Incorrect regex operator usage.
Ensure for loops iterate over multiple values.
Simultaneous reading and writing of the same file in a pipeline, leading to data loss or corruption.
Shell script contains syntax error due to invalid use of parentheses, causing parsing to fail.
Eliminate spaces between '#' and '!' in the shebang.
Lack of quotes around 'tr' command arguments.
Grouping inside square bracket is not preferred; use shell logical operators instead.
Ensure correct command expansion when using find's -exec option.
Shells require non-empty then clauses; use a dummy command like true for a no-operation.
Potential quote termination issue.
Use proper syntax for comments in ShellCheck directives.
Shell script contains an unmatched or extra keyword, causing a syntax error and parsing failure.
Use 'find' for file operations instead of 'ls'.
A loop that appears to be missing a do statement, causing syntax error in shell script.
The script has a parsing error indicating a missing 'then' keyword after 'if' or 'elif' conditions.
Use of non-existent binary operator in test expression.
Use null-terminated filenames with 'find' and 'xargs'.
Shell functions cannot be passed to external commands.
Quote the right-hand side of equality operators in Bash conditional expressions.
Shell script uses incorrectly capitalized keyword, leading to syntax error.
Missing quotes around array expansion.
Unintended termination of script execution due to misuse of 'exec' command.
Ensure variables are properly referenced in shell comparisons.
Incorrect use of logical OR (||) instead of AND (&&) in conditional checks.
Use '$(cmd)' for command output assignment.
Incorrect use of string comparison operator instead of numeric comparison in shell scripts.
Remove trailing whitespace after here-document end token.
Shell script file contains a UTF-8 Byte Order Mark (BOM), potentially causing execution issues.
Use pgrep for process lookup.
Use double square brackets for glob pattern matching in shell scripts.
Keep the here-document end token on a separate line without additional content.
Ensuring that command substitution in for loops is properly handled to get the intended iteration behavior.
Avoid comments on the same line as here-document end token.
Lack of quotes around pattern arguments in 'grep' command.
Using 'find -print0' or 'find -exec' for safer file handling
Use correct operator for pattern matching in shell conditionals.
Incorrect use of 'elseif' or 'elsif' instead of 'elif' in shell scripts.
Identified an invalid unary test operator usage.
Detects an if statement without a matching terminating fi.
Lack of quotes around pattern arguments in 'find' command.
Incorrect use of the less-than '<' or greater-than '>' operator in shell conditional expressions.
Ensure spaces around comparison operators.
Pipe, OR, or AND operators incorrectly placed at the start of a line.
Ensure script adheres to POSIX shell standards.
Prevent unintended command execution from arithmetic expansions.
Avoid using variables in brace range expansions in Bash.
Certain variables are interpreted as another variable followed by a literal string, needing curly braces for clarity.
Invalid variable assignment. Use arrays, declare, or read/eval for indirection.
The problem involves checking the exit code or output of a command in a shell script using different conditional constructs.
Shell script uses == for assignment or comparison outside of test brackets.
Properly escape variables in remote commands to prevent premature expansion.
Identified keywords being used as arguments instead of shell commands, leading to improper interpretation.
Use safe alternatives to iterate over find output.
Use while loop for line-by-line processing.
Double-quoted string is not properly closed.
A loop structure with do keyword lacking the corresponding done, causing syntax error in shell script.
ShellCheck unable to parse a sourced file, leading to incomplete analysis.
Shell script contains literal braces where command grouping or parameter expansion may be intended.
Incorrect attempt to declare function parameters in shell script, leading to potential errors.
Variable modified in a subshell, potentially losing changes.
Shell alias incorrectly nests single quotes, causing syntax errors.
Insert a linefeed between here-document end token and closing parenthesis.
Using glob syntax instead of regular expressions in grep commands.
Remove indentation before the end token (or use <<- and indent with tabs).
Incorrect use of else if.
Eliminate spaces preceding the shebang line.
Ensure variables are properly referenced with a '$' sign.
Missing exclamation mark in shebang line.
Variable expansion occurs before assignment, resulting in unintended values.
Unquoted variables in test expressions causes unexpected script behavior or errors.
Quote the 'EOF' delimiter in here documents for remote execution.
Use the modern '$((..))' syntax for arithmetic operations.
Incorrect use of $ symbol on the left side of variable assignments in shell script.
Use '$(...)' instead of backticks for command substitution.