Skip to content

Commit

Permalink
lint: add safety checker (partially addresse #61)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcofavorito committed May 13, 2023
1 parent aa2a9c9 commit 409e31c
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ jobs:
run: tox -e mypy
- name: Check copyright
run: tox -e check-copyright
- name: Misc checks
run: |
tox -e safety
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ clean-test: ## remove test and coverage artifacts
rm -fr .mypy_cache
rm -fr coverage.xml

lint-all: black isort lint static vulture darglint ## run all linters
lint-all: black isort lint static safety vulture darglint ## run all linters

lint: ## check style with flake8
flake8 pddl tests
Expand All @@ -77,6 +77,9 @@ black: ## apply black formatting
black-check: ## check black formatting
black --check --verbose pddl tests

safety: ## run safety
safety check

vulture: ## check unused code
vulture pddl scripts/whitelist.py

Expand Down
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ vulture = "<2.8,>=2.7"
flake8-bugbear = "<23.6.0,>=23.5.9"
pymdown-extensions = "<9.12,>=9.11"
flake8-isort = ">=6.0.0,<6.1.0"
safety = "<2.4.0,>=2.3.4"

[requires]
python_version = "3.10"
80 changes: 76 additions & 4 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ skip_install = True
deps = isort<5.13.0,>=5.12.0
commands = isort --check-only pddl tests

[testenv:safety]
skipsdist = False
skip_install = False
deps = safety>=2.3.4,<2.4.0
commands = safety check

[testenv:vulture]
skipsdist = True
skip_install = True
Expand Down

0 comments on commit 409e31c

Please sign in to comment.