This repository has been archived by the owner on Oct 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.pre-commit-config.yaml
71 lines (66 loc) · 2.9 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-case-conflict
exclude: ^target/
- id: check-executables-have-shebangs
exclude: (.+.bat$|.+.ps1$|^target/)
- id: check-json
exclude: (resources/flaky-watcher.json$|^target/|^src/test/resources/|.github/actions/(notify-build-status)/tsconfig.json$)
- id: check-merge-conflict
exclude: ^target/
- id: check-yaml
args: [--allow-multiple-documents]
exclude: ^target/
- id: check-xml
exclude: ^target/
- id: end-of-file-fixer
exclude: (^src/test/resources/preCommitToJunit/output|^target/|^vars/README.md|resources/versions/releases.properties|^src/test/resources/|\.github/actions/(snapshoty|notify-build-status)/dist/|mvnw.cmd)
- id: mixed-line-ending
exclude: (src/test/resources/pipeline-log.txt|\.github/actions/(snapshoty|notify-build-status)/dist/)
- id: trailing-whitespace
exclude: (\.github/actions/(snapshoty|notify-build-status)/dist/|mvnw.cmd|src/test/resources/)
- repo: https://github.com/detailyang/pre-commit-shell.git
rev: master
hooks:
- id: shell-lint
name: "Shellscript: lint"
stages: [commit]
types: [shell]
exclude: (^mvnw$|^target/|^.*/gradlew$|mvnw.cmd|.ci/docker/tests/)
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.25.0
hooks:
- id: yamllint
name: "Yaml: lint"
args: ['-c','.ci/.yamlint.yml']
stages: [commit]
types: [yaml]
exclude: (^.pre-commit-config.yaml$|^.pre-commit-hooks.yaml$|^.ci/.yamlint.yml$|^target/)
- repo: https://github.com/elastic/apm-pipeline-library.git
rev: current
hooks:
- id: check-bash-syntax
- id: check-abstract-classes-and-trait # TODO: this hook won't be needed once the CI migration is completed
- id: check-jsonslurper-class # TODO: this hook won't be needed once the CI migration is completed
- id: check-unicode-non-breaking-spaces
- id: remove-unicode-non-breaking-spaces
- id: check-en-dashes
exclude: (^src/test/resources/mappings/|\.github/actions/(snapshoty|notify-build-status)/dist/)
- id: remove-en-dashes
exclude: (^src/test/resources/mappings/|\.github/actions/(snapshoty|notify-build-status)/dist/)
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
args: ['--ignore-words-list','pullrequest,pullrequests']
exclude: (.github/actions/(snapshoty|notify-build-status)|src/test/resources/jobs/)
- repo: local
hooks:
- id: check-docker-images-config
name: check-docker-images-config
description: "Check .ci/.docker-images.yml schema"
language: script
entry: .ci/scripts/validate-docker-images-config-yaml.sh
files: \.ci/\.docker-images(\.yml|\.schema.json)