Compare commits

..

No commits in common. "e51baaef0142cbfebb297ca02ad8b103d67c3d3e" and "59ebd677b70108f9c2a706abedf834cb28460e65" have entirely different histories.

2 changed files with 6 additions and 15 deletions

View File

@ -19,7 +19,7 @@ usage() {
echo
echo " If no paths are provided and this option is not set, all files will be linted."
echo
echo " Note that paths with a file extension that is not '.py' will be excluded."
echo " Note that paths will be excluded if they both have a file extension, and it is not 'py'."
echo "-h"
echo " Display this help text."
}
@ -66,20 +66,11 @@ shift "$((OPTIND-1))"
# Append any remaining arguments as files to lint
files+=("$@")
if [[ $USING_DIFF -eq 1 ]]; then
# If we were asked to lint changed files, and no paths were found as a result...
if [ ${#files[@]} -eq 0 ]; then
# Then print and exit
echo "No files found to lint."
exit 0
fi
else
# If we were not asked to lint changed files, and no paths were found as a result,
# then lint everything!
if [[ -z ${files+x} ]]; then
# Lint all source code files and directories
files=("synapse" "tests" "scripts-dev" "scripts" "contrib" "synctl")
fi
# If we were not asked to lint changed files, and no paths were found as a result,
# then lint everything!
if [[ $USING_DIFF -eq 0 && -z ${files+x} ]]; then
# Lint all source code files and directories
files=("synapse" "tests" "scripts-dev" "scripts" "contrib" "synctl")
fi
echo "Linting these paths: ${files[*]}"