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