Some out-of-the-box hooks for pre-commit.
Add this to your .pre-commit-config.yaml
- repo: https://github.com/chrysa/pre-commit-tools
rev: '' # Use the ref you want to point at
hooks:
- id: format-dockerfiles
stages:
- manual
- id: print-detection
- id: pprint-detection
- add shebang
# syntax=docker/dockerfile:1.4
if missing - group donsecutif same command without space
- group consecutive
RUN
orENV
on one commande line with new line
- separate block for litteral ARGS and ARGS composed with variable
- order alphabeticly ARGS
- order alphabeticly ENV
- add config file support
detect print on python code if is not commented or excape with # print-detection: disable
detect pprint on python code if is not commented or excape with # pprint-detection: disable
generate pylint html reports
use --=output-json
to define json output and --output-html=
to specify html output