-
Notifications
You must be signed in to change notification settings - Fork 0
Linter
Mateus Oliveira edited this page Feb 21, 2023
·
4 revisions
Lint, or a linter, is a static code analysis tool used to flag programming errors, bugs, stylistic errors and suspicious constructs.
The template enforces linting in three ways:
- Prospector: if there are unused imports, style breaks or not optimized code, for example, Prospector will indicate them.
-
hadolint: if there are not optimized instructions in the Dockerfile, hadolint will indicate them. To run it, run
./scripts/docky.py lint
. -
shellcheck: if there warnings or suggestions instructions in shell files, shellcheck will indicate them. To run it, run
dev lint --shell
.
https://github.com/mateusoliveira43/python-project-template/blob/main/.prospector.yaml#L1-L14
https://github.com/mateusoliveira43/python-project-template/blob/main/tests/.prospector.yaml#L1-L4
The command dev lint
(an alias to prospector && prospector --profile tests/.prospector.yaml tests
) will check the project's Python code.