--- a/tests/tools/check_source.sh Wed Oct 03 11:44:57 2018 +0300
+++ b/tests/tools/check_source.sh Wed Oct 03 11:47:04 2018 +0300
@@ -52,6 +52,32 @@
echo ""
}
+
+python3_compile_checks()
+{
+ echo "Syntax checking using python3 ..."
+ python3 --version
+
+ # remove compiled Python files
+ find . -name '*.pyc' -exec rm -f {} \;
+
+ for i in $py_files; do
+ # echo $i
+ python3 -m py_compile $i
+ if [ $? -ne 0 ]; then
+ echo "Syntax error in $i"
+ set_exit_error
+ fi
+ done
+
+ # remove compiled Python files
+ find . -name '*.pyc' -exec rm -f {} \;
+
+ echo "DONE"
+ echo ""
+}
+
+
# pep8 was renamed to pycodestyle
# detect existed version
pep8_detect()
@@ -390,6 +416,7 @@
main()
{
get_files_to_check $@
+ python3_compile_checks
compile_checks
pep8_checks_default
# pep8_checks_selected