Open mbrzus opened 5 months ago
@powersaudrey25 @Ivan-E-Johnson @zmorris248 I am struggling to get it to work.
This is the code snippet added to the .pre-commit file
# Hadolint for dockers
- repo: https://github.com/hadolint/hadolint
rev: v2.12.0
hooks:
- id: hadolint-docker
entry: hadolint/hadolint:v2.12.0 hadolint
It runs without error, BUT, it says:
Lint Dockerfiles.....................................(no files to check)Skipped
I tried to add the line:
files: '^Dockerfile.*'
to point it to our dockerfiles but it still says no files to check
Have you tried
files: 'Dockerfile_*'
?
Have you tried
files: 'Dockerfile_*'
?
Yes, I tried many different ways I was able to find online but everytime I get the "no files to check"
If this feature request related to a problem? Please describe.
Implement Hedolint into the pre-commit hooks to ensure clean dockerfile syntax and error catching
Rationale
Hedolint will ensure stable error-free syntax in our dockerfiles. It will help us catch errors faster and ensure stable code base and development standards.
Implementation Ideas Follow the hedolint precommit resources https://github.com/hadolint/hadolint/blob/master/.pre-commit-hooks.yaml