Skip to content

Commit 96af868

Browse files
committed
chore(linters): Introduce hadolint config file and reorder linters
1 parent c949dd2 commit 96af868

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

.hadolint.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
ignored:
2+
- DL3007 # Using latest
3+
- DL3013 # Pin versions in pip
4+
- DL3027 # Do not use apt
5+
- DL3059 # Docker `RUN`s shouldn't be consolidated here
6+
- DL4006 # Not related to alpine
7+
- SC1091 # Useless check
8+
- SC2015 # Useless check
9+
- SC3037 # Not related to alpine

.pre-commit-config.yaml

Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,13 @@ repos:
4747
hooks:
4848
- id: gitleaks
4949

50-
#
51-
# YAML Linters
52-
#
50+
# Dockerfile
51+
- repo: https://github.com/hadolint/hadolint
52+
rev: v2.12.1-beta
53+
hooks:
54+
- id: hadolint
55+
56+
# YAML
5357
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
5458
rev: 0.2.3
5559
hooks:
@@ -71,14 +75,29 @@ repos:
7175
args:
7276
- --strict
7377

74-
# JSON5 Linter
78+
# JSON5
7579
- repo: https://github.com/pre-commit/mirrors-prettier
7680
rev: v3.1.0
7781
hooks:
7882
- id: prettier
7983
# https://prettier.io/docs/en/options.html#parser
8084
files: .json5$
8185

86+
# Bash
87+
- repo: https://github.com/jumanjihouse/pre-commit-hooks
88+
rev: 3.0.0
89+
hooks:
90+
- id: shfmt
91+
args:
92+
- -l
93+
- -i
94+
- '2'
95+
- -ci
96+
- -sr
97+
- -w
98+
- id: shellcheck
99+
100+
# Python
82101
- repo: https://github.com/pre-commit/mirrors-mypy.git
83102
rev: v1.15.0
84103
hooks:
@@ -133,31 +152,3 @@ repos:
133152
- --lineprecision-report=.tox/.tmp/.test-results/mypy--py-3.9
134153
- --txt-report=.tox/.tmp/.test-results/mypy--py-3.9
135154
pass_filenames: false
136-
137-
- repo: https://github.com/jumanjihouse/pre-commit-hooks
138-
rev: 3.0.0
139-
hooks:
140-
- id: shfmt
141-
args:
142-
- -l
143-
- -i
144-
- '2'
145-
- -ci
146-
- -sr
147-
- -w
148-
- id: shellcheck
149-
150-
# Dockerfile linter
151-
- repo: https://github.com/hadolint/hadolint
152-
rev: v2.12.1-beta
153-
hooks:
154-
- id: hadolint
155-
args:
156-
- --ignore=DL3007 # Using latest
157-
- --ignore=DL3013 # Pin versions in pip
158-
- --ignore=DL3027 # Do not use apt
159-
- --ignore=DL3059 # Docker `RUN`s shouldn't be consolidated here
160-
- --ignore=DL4006 # Not related to alpine
161-
- --ignore=SC1091 # Useless check
162-
- --ignore=SC2015 # Useless check
163-
- --ignore=SC3037 # Not related to alpine

0 commit comments

Comments
 (0)