Sign inSign up

flywheel/lint

By flywheel

•Updated about 5 years ago

Dockerized linting and format checks

Image
0

10K+

flywheel/lint repository overview

⁠flywheel/lint

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.

⁠Usage

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

⁠Included tools

⁠Configuration

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:

ToolEnvvar in .envDefault ARGSConfig file
blackBLACK_EXTRA/ARGSnonepyproject.toml⁠
hadolintHADOLINT_EXTRA/ARGS--ignore DL3005 --ignore DL3059.hadolint.yaml⁠
jsonlintJSONLINT_EXTRA/ARGS--in-place --insert-final-newlinenone
markdownlintMARKDOWNLINT_EXTRA/ARGS--fix.markdownlint.json⁠
pydocstylePYDOCSTYLE_EXTRA/ARGS--convention=google.pydocstyle.ini⁠
shellcheckSHELLCHECK_EXTRA/ARGS--external-sources --color=always.shellcheckrc⁠
yamllintYAMLLINT_EXTRA/ARGS-f colored.yamllint.yml⁠

If not present, the following config files are auto-injected:

⁠Development

⁠Publishing

Images are published to dockerhub⁠ on every successful CI build.

⁠License

MIT

⁠Repository

flywheel-io/tools/img/lint⁠

Tag summary

Content type

Image

Digest

Size

155.8 MB

Last updated

about 5 years ago

docker pull flywheel/lint