mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
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:
16
Makefile
16
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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user