facebook pixelCodiga Analysis Shell Rules, category best practice
BACK TO LIST

Shell rules

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.

1099

Best practice
Critical

You need a space before the #.

Learn more

2000

Best practice
Informational

See if you can use ${#variable} instead.

2003

Best practice
Informational

expr is antiquated. Consider rewriting this using $((..))

2006

Best practice
Informational

Use $(...) notation instead of legacy backticked `...`.

2196

Best practice
Informational

egrep is non-standard and deprecated. Use grep -E instead.

2239

Best practice
Error

Ensure the shebang uses an absolute path to the interpreter

2254

Best practice
Warning

Quote expansions in case patterns to match literally rather than as a glob

2041

Best practice
Error

To run as a command, use $(..) instead of '..'

2238

Best practice
Warning

Redirecting to/from command name instead of file. Did you want pipes/xargs (or quote to ignore)?

2107

Best practice
Error

Instead of [ a && b ], use [ a ] && [ b ]