NOTE: This image is deprecated and pending removal. Please use tools/img/qa-ci as a drop-in replacement.
Dockerized linting, style checks and formatting for both development and CI.
This image is used within the test:flywheel-lint pre-commit hook and CI job in
tools/etc/qa-ci.
To run the image directly on any project folder:
docker run --rm -tv $(pwd):/src flywheel/lint
Arguments passed to the linters can be extended (or overridden) using environment
variables, which are read from a .env file at the project root if present. For
example, to ignore an error in shellcheck, add the following to your .env:
# add an extra exclude, leaving any default args intact
SHELLCHECK_EXTRA="--exclude=SC2061"
The default arguments passed to the tools are recommended to be kept as-is, but
can also be overridden by using the _ARGS envvars (instead of _EXTRA):
# override the default google convention (see defaults below)
PYDOCSTYLE_ARGS="--convention=pep257"
Finally, the individual tools may support loading further custom settings from a default config location if it exists at the project root:
| Tool | Envvar in .env | Default ARGS | Config file |
|---|---|---|---|
black | BLACK_EXTRA/ARGS | none | pyproject.toml |
hadolint | HADOLINT_EXTRA/ARGS | --ignore DL3005 --ignore DL3059 | .hadolint.yaml |
jsonlint | JSONLINT_EXTRA/ARGS | --in-place --insert-final-newline | none |
markdownlint | MARKDOWNLINT_EXTRA/ARGS | --fix | .markdownlint.json |
pydocstyle | PYDOCSTYLE_EXTRA/ARGS | --convention=google | .pydocstyle.ini |
shellcheck | SHELLCHECK_EXTRA/ARGS | --external-sources --color=always | .shellcheckrc |
yamllint | YAMLLINT_EXTRA/ARGS | -f colored | .yamllint.yml |
If not present, the following config files are auto-injected:
pre-commit installDockerfilelint/hooks.ymlImages are published to dockerhub on every successful CI build.
Content type
Image
Digest
Size
155.8 MB
Last updated
about 5 years ago
docker pull flywheel/lint