facebook pixelShell Static Analysis Rules
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
      Minor

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

      2143

      Error prone
      Minor

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

      2160

      Error prone
      Minor

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

      2161

      Error prone
      Minor

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

      2175

      Error prone
      Minor

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

      2233

      Error prone
      Minor

      Remove superfluous (..) around condition.

      2234

      Error prone
      Minor

      Remove superfluous (..) around test command.

      Learn more

      2235

      Error prone
      Minor

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

      2236

      Error prone
      Minor

      Use -n instead of ! -z.

      2237

      Error prone
      Minor

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