facebook pixelCodiga Analysis Shell Rules, severity informational , category error prone
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.

2126

Error prone
Informational

Consider using grep -c instead of grep|wc -l.

2143

Error prone
Informational

Use egrep -q instead of comparing output with [ -n .. ].

2160

Error prone
Informational

Instead of '[ true ]', just use 'true'

2161

Error prone
Informational

Instead of '[ 1 ]', just use '1'

2175

Error prone
Informational

Quote this invalid brace expansion since it should be passed literally to eval.

2233

Error prone
Informational

Remove superfluous (..) around condition.

2234

Error prone
Informational

Remove superfluous (..) around test command.

Learn more

2235

Error prone
Informational

Use { ..; } instead of (..) to avoid subshell overhead.

2236

Error prone
Informational

Use -n instead of ! -z.

2237

Error prone
Informational

Use [ -n .. ] instead of ! [ -z .. ].