yvoronoy/m2install

View on GitHub
tests/functional/test-restore-corrupted-dumps-missing-files.sh

Summary

Maintainability
Test Coverage

Don't use ls | grep. Use a glob or a for loop with a condition to allow non-alphanumeric filenames.
Open

ls -A | grep -v var | xargs rm -rf

Don't use ls | grep. Use a glob or a for loop with a condition to allow non-alphanumeric filenames.

Problematic code:

ls /directory | grep target_file_pattern

Correct code:

ls /directory/target_file_pattern

Rationale:

Matching non-alphanumeric characters with grep may require escaping. Typically it is cleaner to use the built in pattern matching or another command like find

Exceptions:

None

Notice

Original content from the ShellCheck https://github.com/koalaman/shellcheck/wiki.

There are no issues that match your filters.

Category
Status