intracom-telecom-sdn/nstat

View on GitHub
emulators/sbemu/multinet/clean.sh

Summary

Maintainability
Test Coverage

Showing 9 of 9 total issues

Double quote to prevent globbing and word splitting.
Open

if [ $item != 'build.sh' ] && [ $item != 'clean.sh' ]; then

Double quote to prevent globbing and word splitting.
Open

if [ $item != 'build.sh' ] && [ $item != 'clean.sh' ]; then

Double quote to prevent globbing and word splitting.
Open

for item in $( ls -1 $SCRIPT_DIR ); do

Double quote to prevent globbing and word splitting.
Open

rm -rf $SCRIPT_DIR/$item

Double quote to prevent globbing and word splitting.
Open

echo $SCRIPT_DIR

Use "${var:?}" to ensure this never expands to / .
Open

rm -rf $SCRIPT_DIR/$item

Iterating over ls output is fragile. Use globs.
Open

for item in $( ls -1 $SCRIPT_DIR ); do

Double quote to prevent globbing and word splitting.
Open

rm -rf $SCRIPT_DIR/$item

Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
Open

if [ $? -ne 0 ]; then

There are no issues that match your filters.

Category
Status