chore(tools): update pylint target to lint dirs separately

- avoids triggering duplicate code detection between hdk tests and
benchmarks
- update helper script serialize_targets.sh to avoid printing dir
This commit is contained in:
Arthur Meyre
2021-08-23 15:09:33 +02:00
parent 1d5be5a1e7
commit 30e00df977
2 changed files with 16 additions and 2 deletions

View File

@@ -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

View File

@@ -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