Skip to content

Commit

Permalink
tox: Enable testing and linting ngclient
Browse files Browse the repository at this point in the history
* Use the same rules as tuf/api
* omit ngclient from coverage limits for now: theupdateframework#1309

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
  • Loading branch information
Jussi Kukkonen committed May 21, 2021
1 parent 26b89b7 commit 3b008d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ changedir = tests
commands =
python --version
python -m coverage run aggregate_tests.py
python -m coverage report -m --fail-under 97
python -m coverage report -m --fail-under 97 --omit "{toxinidir}/tuf/ngclient/*"

deps =
-r{toxinidir}/requirements-test.txt
Expand All @@ -42,12 +42,12 @@ commands =
commands =
# Use different configs for new (tuf/api/*) and legacy code
# TODO: configure black and isort args in pyproject.toml (see #1161)
black --check --diff --line-length 80 {toxinidir}/tuf/api
isort --check --diff --line-length 80 --profile black -p tuf {toxinidir}/tuf/api
pylint {toxinidir}/tuf/api --rcfile={toxinidir}/tuf/api/pylintrc
black --check --diff --line-length 80 {toxinidir}/tuf/api {toxinidir}/tuf/ngclient
isort --check --diff --line-length 80 --profile black -p tuf {toxinidir}/tuf/api {toxinidir}/tuf/ngclient
pylint {toxinidir}/tuf/api {toxinidir}/tuf/ngclient --rcfile={toxinidir}/tuf/api/pylintrc

# NOTE: Contrary to what the pylint docs suggest, ignoring full paths does
# work, unfortunately each subdirectory has to be ignored explicitly.
pylint {toxinidir}/tuf --ignore={toxinidir}/tuf/api,{toxinidir}/tuf/api/serialization
pylint {toxinidir}/tuf --ignore={toxinidir}/tuf/api,{toxinidir}/tuf/api/serialization,{toxinidir}/tuf/ngclient,{toxinidir}/tuf/ngclient/_internal

bandit -r {toxinidir}/tuf

0 comments on commit 3b008d1

Please sign in to comment.