diff --git a/Makefile b/Makefile index f1ed317a9..8046b9cf7 100644 --- a/Makefile +++ b/Makefile @@ -25,9 +25,23 @@ check_strip_nb: .PHONY: strip_nb pylint: - poetry run pylint --rcfile=pylintrc hdk tests benchmarks + +poetry run env bash script/make_utils/serialize_targets.sh pylint_src pylint_tests pylint_benchmarks .PHONY: pylint +pylint_src: + poetry run pylint --rcfile=pylintrc hdk +.PHONY: pylint_src + +pylint_tests: + @# Disable duplicate code detection in tests + poetry run pylint --disable=R0801 --rcfile=pylintrc tests +.PHONY: pylint_tests + +pylint_benchmarks: + @# Disable duplicate code detection in benchmarks + poetry run pylint --disable=R0801 --rcfile=pylintrc benchmarks +.PHONY: pylint_benchmarks + flake8: poetry run flake8 --max-line-length 100 --per-file-ignores="__init__.py:F401" hdk/ tests/ benchmarks/ .PHONY: flake8 diff --git a/script/make_utils/serialize_targets.sh b/script/make_utils/serialize_targets.sh index 882bdb6e6..2b4b802af 100755 --- a/script/make_utils/serialize_targets.sh +++ b/script/make_utils/serialize_targets.sh @@ -5,7 +5,7 @@ set +e EXIT_CODE=0 for make_target in "$@"; do - make "${make_target}" + make --no-print-directory "${make_target}" if [[ "$?" != "0" ]]; then EXIT_CODE=1 fi