-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
102 lines (88 loc) · 2.7 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
102 lines (88 loc) · 2.7 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- repo: local
hooks:
- id: json-schema
name: JSON Schema
entry: bin/run-linter --cd app -- ruby bin/validate-json-schemas
language: system
files: '^docs/api/schemas/.*\.json$'
pass_filenames: false
- id: rubocop
name: rubocop
entry: bin/run-linter --cd app -- bundle exec rubocop --autocorrect --force-exclusion
language: ruby
files: '^app/(.*\.rb|.rubocop.*\.yml)$'
- id: erblint
name: erblint
entry: bin/run-linter --cd app -- bundle exec erb_lint --autocorrect
language: ruby
files: '^app/.*\.erb$'
- id: i18n-unused
name: i18n-unused
entry: bin/run-linter --cd app -- bundle exec i18n-tasks unused
language: ruby
files: '^app/config/locales/.*\.yml$'
pass_filenames: false
- id: i18n-normalize
name: i18n-normalize
entry: bin/run-linter --cd app -- bundle exec i18n-tasks normalize
language: ruby
files: '^app/config/locales/.*\.yml$'
pass_filenames: false
- id: shellcheck
name: shellcheck
entry: shellcheck
language: system # installed via `brew bundle`
files: '^bin/.*$'
- id: prettier
name: prettier
entry: bin/run-linter --cd app -- npm run format:precommit
language: node
additional_dependencies: ["prettier"]
files: '^app/.*\.(js|ts|json)$'
- id: terraform_fmt
name: Terraform Fmt
entry: terraform fmt
language: system
files: 'infra/.*\.tf$'
- id: checkov
name: Checkov
entry: checkov --quiet --output sarif --framework terraform -f
language: system
files: 'infra/.*\.tf$'
- id: hadolint
name: Hadolint
entry: hadolint
language: system
files: '.*/Dockerfile'
- id: patch-dockerfile-test
name: patch-dockerfile.rb test
entry: ruby .github/scripts/patch-dockerfile_test.rb
language: system
files: '^(\.github/scripts/patch-dockerfile.*\.rb|app/Dockerfile)$'
pass_filenames: false
- id: fix-ruby-dependencies-test
name: fix-ruby-dependencies.rb test
entry: ruby .github/scripts/fix-ruby-dependencies_test.rb
language: system
files: '^\.github/scripts/fix-ruby-dependencies.*\.rb$'
pass_filenames: false
- id: actionlint
name: ActionLint
entry: actionlint
language: system
files: '^.github/.*\.yml$'
pass_filenames: false
- id: markdown_link_check
name: MarkdownLinkCheck
entry: npx markdown-link-check --config .github/workflows/markdownlint-config.json
language: system
files: '.*\.md$'