A python package that provides a pip-installable hadolint binary.
The mechanism by which the binary is downloaded is basically copied from shellcheck-py.
The package hasn't been published to PyPI yet, and may never be, as its primary purpose doesn't require it. However you can install it through git:
pip install git+https://github.com/AleksaC/[email protected]To install another version simply replace the v2.14.0 with the version you want.
This package was primarily built to provide a convenient way of running hadolint as a pre-commit hook, since haskell isn't supported by pre-commit. An alternative to this solution is to create a docker hook since hadolint provides a docker image, but I think that it has unnecessary amount of overhead.
Example .pre-commit-config.yaml with rules DL3025 and DL3018 excluded:
repos:
- repo: https://github.com/AleksaC/hadolint-py
rev: v2.14.0
hooks:
- id: hadolint
args: [--ignore, DL3025, --ignore, DL3018]