Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aleksac/hadolint-py
Run hadolint in pre-commit without docker or system installation
https://github.com/aleksac/hadolint-py
dockerfile-linter hadolint pip pre-commit pre-commit-hook
Last synced: 4 days ago
JSON representation
Run hadolint in pre-commit without docker or system installation
- Host: GitHub
- URL: https://github.com/aleksac/hadolint-py
- Owner: AleksaC
- License: mit
- Created: 2020-12-13T16:40:07.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-05-10T20:45:55.000Z (6 months ago)
- Last Synced: 2024-05-10T21:53:16.916Z (6 months ago)
- Topics: dockerfile-linter, hadolint, pip, pre-commit, pre-commit-hook
- Language: Python
- Homepage:
- Size: 45.9 KB
- Stars: 23
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hadolint-py
[![Add new versions](https://github.com/AleksaC/hadolint-py/actions/workflows/add-new-versions.yml/badge.svg)](https://github.com/AleksaC/hadolint-py/actions/workflows/add-new-versions.yml)
[![Run tests](https://github.com/AleksaC/hadolint-py/actions/workflows/tests.yml/badge.svg)](https://github.com/AleksaC/hadolint-py/actions/workflows/tests.yml)
[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)A python package that provides a pip-installable
[hadolint](https://github.com/hadolint/hadolint) binary.The mechanism by which the binary is downloaded is basically copied from
[shellcheck-py](https://github.com/shellcheck-py/shellcheck-py).## Getting started
### Installation
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:```shell script
pip install git+https://github.com/AleksaC/[email protected]
```To install another version simply replace the v2.12.0 with the version you want.
### With pre-commit
This package was primarily built to provide a convenient way of running hadolint
as a [pre-commit](https://pre-commit.com) 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:
```yaml
repos:
- repo: https://github.com/AleksaC/hadolint-py
rev: v2.12.1b3
hooks:
- id: hadolint
args: [--ignore, DL3025, --ignore, DL3018]
```## Contact 🙋♂️
- [Personal website](https://aleksac.me)
-
- [email protected]