1017
Literal carriage return. Run script through tr -d '\\r' .
Bash, zsh, ksh: regardless what Shell you use, Codiga got you covered. With hundreds of rules, the Codiga Static Engine checks for any issue in your shell script and surfaces issues in your Shell codebase.
Literal carriage return. Run script through tr -d '\\r' .
This is a unicode non-breaking space. Delete and retype it.
Expected this to be an argument to the unary condition.
You need a space before the ]].
You are missing a required space after the !.
(' is invalid here. Did you forget to escape it?
Couldn't find 'fi' for this 'if'.
Expected 'fi' matching previously mentioned 'if'.
Can't have empty else clauses (use 'true' as a no-op).
Did you forget the 'then' for this 'if'?
Expected 'then'.
You need a space after the '{'.
You need at least one command here. Use 'true;' as a no-op.
Expected a '}'. If you have one
Expected 'do'.
Couldn't find 'done' for this 'do'.
Expected 'done' matching previously mentioned 'do'.
Expected a { to open the function definition.
Trying to declare parameters? Don't. Use () and refer to params as $1
Don't use $ on the left side of assignments.
Parsing stopped here. Mismatched keywords or invalid parentheses?
ShellCheck only supports sh/bash/dash/ksh scripts. Sorry!
Expected 'then'. Fix any mentioned problems and try again.
Couldn't parse this escaped char. Fix to allow more checks.
Use 'elif' instead of 'else if' (or put 'if' on new line if nesting).
You need \\ before line feeds to break lines in [ ].
This file has a UTF-8 BOM. Remove it with: LC\_CTYPE=C sed '1s/^...//' < yourscript .
Use #! and not !# for shebang
Don't use $ on the iterator name in for loops.
Parsing stopped here. Invalid use of parentheses?
Parsing stopped here. Is this keyword correctly matched up?
You need a space or linefeed between the function name and body.
You need a space before the #.
Delete trailing spaces after \\ to break line (or use quotes for literal space).
Use #! and not ! for shebang
Use #! for the shebang
Remove spaces between # and ! in the shebang.
Missing $ on a $((..)) expression? (or use ( ( for arrays).
Add a linefeed between end token and terminating ')'.
Place shellcheck directives before commands
Was this intended as a comment? Use # in sh.
The shebang must be on the first line. Delete blanks and move comments.
Since you double quoted this
Missing ';' or + terminating -exec. You can't use |/||/&&
-n doesn't work with unquoted arguments. Quote or use [[ ]].
Decimals are not supported. Either use integers only
Don't quote rhs of =~
You need spaces around the comparison operator.
This expression is constant. Did you forget a $ somewhere?
[ .. ] can't match globs. Use [[ .. ]] or case statement.
To expand via indirection
On most OS, shebangs can only specify a single parameter
In functions, use return instead of break
continue is only valid in loops.
Aliases can't use positional parameters. Use a function.
-e doesn't work with globs. Use a for loop.
Can only return 0-255. Other data should be written to stdout.
Argument to -z is always false due to literal strings.
local' is only valid in functions.
SIGKILL/SIGSTOP can not be trapped.
Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).
Globs are ignored in [[ ]] except right of =/!=. Use a loop.
This cp has no destination. Check the arguments.
Can only exit with status 0-255. Other data should be written to stdout/stderr.
This shebang specifies a directory. Ensure the interpreter is a file
We use cookies to improve your site experience, including analytics cookies to understand how you use our product and design better experiences. Please read our Cookie Policy.