--- a/tests/tools/check_source.sh Fri Jun 08 15:10:27 2018 +0300
+++ b/tests/tools/check_source.sh Sat Jun 09 17:13:16 2018 +0300
@@ -35,8 +35,6 @@
echo "Syntax checking using python ..."
- py_files=$(find . -name '*.py')
# remove compiled Python files
@@ -93,7 +91,7 @@
ignore=$user_ignore,$default_ignore
# $pep8 --ignore $ignore --exclude build ./
- $pep8 --max-line-length 300 --exclude build ./
+ $pep8 --max-line-length 300 --exclude build $py_files @@ -164,7 +162,7 @@
user_select=$user_select,E402 # E402 module level import not at top of file
user_select=$user_select,W503 # W503 line break before binary operator
- $pep8 --select $user_select --exclude=build .
+ $pep8 --select $user_select --exclude=build $py_files @@ -187,7 +185,7 @@
echo -n "flake8 version: "
- flake8 --max-line-length=300 --exclude=build --builtins="_" ./
+ flake8 --max-line-length=300 --exclude=build --builtins="_" $py_files @@ -306,7 +304,7 @@
- find ./ -name '*.py' | grep -v '/build/' | xargs pylint $options
+ echo $py_files | xargs pylint $options @@ -315,8 +313,22 @@
+ py_files=$(find . -name '*.py' -not -path '*/build/*') + if [ "$1" = "--only-changes" ]; then + if which hg > /dev/null; then + echo "Only changes will be checked" + py_files=$(hg status -m -a -n -I '**.py') @@ -325,4 +337,4 @@