-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.pre-commit-config.yaml
54 lines (52 loc) · 1.71 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.7
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
#-- Generic checks.
# Check for files that would conflict in case-insensitive filesystems.
- id: check-case-conflict
# Check for files that contain merge conflict strings.
- id: check-merge-conflict
# Checks for symlinks which do not point to anything.
- id: check-symlinks
# Prevent giant files from being committed.
- id: check-added-large-files
#-- Content specific checks.
# Trims trailing whitespace.
- id: trailing-whitespace
# Ensures that a file is either empty, or ends with one newline.
- id: end-of-file-fixer
# Replaces or checks mixed line ending.
- id: mixed-line-ending
args: [--fix=lf]
# Detects the presence of private keys.
- id: detect-private-key
# Checks yaml files for parseable syntax.
- id: check-yaml
- repo: local
hooks:
# Checks shell scripts.
- id: shellcheck
name: shellcheck
language: docker_image
entry: koalaman/shellcheck:v0.7.0
args: [-xa]
types: [shell]
# Autoformats shell scripts.
- id: shfmt
name: shfmt
language: docker_image
entry: mvdan/shfmt:v3.0.0
args: [-ln=bash, -i, '2', -bn, -ci, -sr, -w]
types: [shell]
# Checks Dockerfiles.
- id: hadolint
name: hadolint
language: docker_image
entry: hadolint/hadolint:v1.17.4
args: [hadolint]
types: [dockerfile]