mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-05 17:53:52 +00:00
pytype flake8 mypy
This commit is contained in:
42
scripts/check-syntax.sh
vendored
42
scripts/check-syntax.sh
vendored
@@ -28,12 +28,26 @@ fi
|
||||
echo "=> pycodestyle version:"
|
||||
pycodestyle --version
|
||||
|
||||
if ! which pyflakes >/dev/null 2>&1; then
|
||||
echo "Install pyflakes"
|
||||
if ! which flake8 >/dev/null 2>&1; then
|
||||
echo "Install flake8"
|
||||
exit 1
|
||||
fi
|
||||
echo "=> pyflakes version:"
|
||||
pyflakes --version
|
||||
echo "=> flake8 version:"
|
||||
flake8 --version
|
||||
|
||||
if ! which pytype >/dev/null 2>&1; then
|
||||
echo "Install pytype"
|
||||
exit 1
|
||||
fi
|
||||
echo "=> pytype version:"
|
||||
pytype --version
|
||||
|
||||
if ! which mypy >/dev/null 2>&1; then
|
||||
echo "Install mypy"
|
||||
exit 1
|
||||
fi
|
||||
echo "=> mypy version:"
|
||||
mypy --version
|
||||
|
||||
# checking for TODO/FIXME
|
||||
echo "--------------------------------------"
|
||||
@@ -62,10 +76,10 @@ echo "checking dotdrop with pycodestyle"
|
||||
pycodestyle --ignore=W503,W504 dotdrop/
|
||||
pycodestyle scripts/
|
||||
|
||||
# pyflakes tests
|
||||
# flake8 tests
|
||||
echo "------------------------------"
|
||||
echo "checking dotdrop with pyflakes"
|
||||
pyflakes dotdrop/
|
||||
echo "checking dotdrop with flake8"
|
||||
flake8 dotdrop/
|
||||
|
||||
# pylint
|
||||
echo "----------------------------"
|
||||
@@ -90,6 +104,20 @@ pylint \
|
||||
--disable=R0904 \
|
||||
dotdrop/
|
||||
|
||||
# pytype
|
||||
echo "----------------------------"
|
||||
echo "checking dotdrop with pytype"
|
||||
pytype dotdrop/
|
||||
|
||||
# mypy
|
||||
echo "----------------------------"
|
||||
echo "checking dotdrop with mypy"
|
||||
# --strict
|
||||
mypy \
|
||||
--ignore-missing-imports \
|
||||
--allow-redefinition \
|
||||
dotdrop/
|
||||
|
||||
# check shell scripts
|
||||
# SC2002: Useless cat
|
||||
# SC2126: Consider using grep -c instead of grep|wc -l
|
||||
|
||||
Reference in New Issue
Block a user