mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Ignore dev_scripts/envs for tests/lints
Ignore the `dev_scripts/envs` folder when running tests or linting code, as it may contain files that are not owned by the current user. In this case, we've seen that pytest/black etc. fail. This typically happens when the user has run Dangerzone in a containerized environment (see #286), and Podman created a directory with files owned by the user in the nested container.
This commit is contained in:
parent
e3431c7ac2
commit
f16b42bb18
1 changed files with 5 additions and 5 deletions
10
Makefile
10
Makefile
|
@ -1,18 +1,18 @@
|
||||||
.PHONY: lint-black
|
.PHONY: lint-black
|
||||||
lint-black: ## check python source code formatting issues, with black
|
lint-black: ## check python source code formatting issues, with black
|
||||||
black --check --diff ./
|
black --check --diff --exclude dev_scripts/envs ./
|
||||||
|
|
||||||
.PHONY: lint-black-apply
|
.PHONY: lint-black-apply
|
||||||
lint-black-apply: ## apply black's source code formatting suggestions
|
lint-black-apply: ## apply black's source code formatting suggestions
|
||||||
black ./
|
black --exclude dev_scripts/envs ./
|
||||||
|
|
||||||
.PHONY: lint-isort
|
.PHONY: lint-isort
|
||||||
lint-isort: ## check imports are organized, with isort
|
lint-isort: ## check imports are organized, with isort
|
||||||
isort --check-only ./
|
isort --check-only --skip dev_scripts/envs/** ./
|
||||||
|
|
||||||
.PHONY: lint-isort-apply
|
.PHONY: lint-isort-apply
|
||||||
lint-isort-apply: ## apply isort's imports organization suggestions
|
lint-isort-apply: ## apply isort's imports organization suggestions
|
||||||
isort ./
|
isort --skip dev_scripts/envs/** ./
|
||||||
|
|
||||||
MYPY_ARGS := --ignore-missing-imports \
|
MYPY_ARGS := --ignore-missing-imports \
|
||||||
--disallow-incomplete-defs \
|
--disallow-incomplete-defs \
|
||||||
|
@ -40,7 +40,7 @@ lint-apply: lint-black-apply lint-isort-apply ## apply all the linter's suggesti
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
./dev_scripts/pytest-wrapper.py -v --cov
|
./dev_scripts/pytest-wrapper.py -v --cov --ignore dev_scripts
|
||||||
|
|
||||||
# Makefile self-help borrowed from the securedrop-client project
|
# Makefile self-help borrowed from the securedrop-client project
|
||||||
# Explaination of the below shell command should it ever break.
|
# Explaination of the below shell command should it ever break.
|
||||||
|
|
Loading…
Reference in a new issue