forked from zammad/zammad
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.overcommit.yml
More file actions
139 lines (130 loc) · 3.41 KB
/
.overcommit.yml
File metadata and controls
139 lines (130 loc) · 3.41 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# Don't complain when changing branches with different overcommit configurations.
verify_signatures: false
# Invoke bundler context, required in devcontainers.
gemfile: Gemfile
CommitMsg:
ALL:
enabled: false
EmptyMessage:
enabled: true
PreCommit:
ALL:
enabled: false
RuboCop:
enabled: true
on_warn: fail
command: ['bundle', 'exec', 'rubocop']
CoffeeLint:
required_executable: 'coffeelint'
install_command: 'npm install -g @coffeelint/cli'
# .dev/coffeelint/rules/* not supported in YAML, specify all rules separately.
flags:
['--reporter=csv', '--rules', './.dev/coffeelint/rules/detect_translatable_string.coffee']
enabled: true
on_warn: fail
exclude: 'public/assets/chat/**/*'
Stylelint:
enabled: true
required_executable: 'pnpm'
command: ['pnpm', '--silent', 'lint:css:cmd']
include:
- '**/*.scss'
- '**/*.css'
- '**/*.vue'
TranslationCatalogCheck:
required_executable: 'rails'
enabled: true
env:
ZAMMAD_SAFE_MODE: '1'
command: ['rails', 'generate', 'zammad:translation_catalog', '--check']
SettingsTypesCheck:
required_executable: 'rails'
enabled: true
env:
ZAMMAD_SAFE_MODE: '1'
command: ['rails', 'generate', 'zammad:setting_types', '--check']
include:
- 'db/seeds/settings.rb'
GraphQLAPICheck:
required_executable: '.gitlab/check_graphql_api_consistency.sh'
enabled: true
command: ['.gitlab/check_graphql_api_consistency.sh']
include:
- 'app/graphql/**/*'
- 'app/frontend/**/*.graphql'
TypeCheck:
required_executable: 'pnpm'
enabled: true
command: ['pnpm', 'lint:ts']
exclude:
- 'node_modules'
- 'public'
- 'vendor'
include:
- 'app/frontend/**/*'
- '**/*.cy.ts'
- '**/cypress/**/*.ts'
- './vite.config.*'
- './vitest.setup.ts'
# Custom Eslint hook, necessary due to dropping of the "compact" formatter in v9.
# The hook now relies on the default "stylish" formatter and checks stdout instead.
# See `.git-hooks/pre_commit/eslint.rb` for details.
Eslint:
required_executable: 'pnpm'
enabled: true
command: ['pnpm', 'lint:js:eslint:cmd']
exclude:
- 'app/assets/**/*'
- 'public/assets/chat/**/*'
- 'public/assets/form/**/*'
include:
- '**/*.js'
- '**/*.ts'
- '**/*.vue'
Oxlint:
required_executable: 'pnpm'
enabled: true
command: ['pnpm', 'lint:js:oxlint:cmd']
flags: ['app/frontend/', '.eslint-plugin-zammad/']
exclude:
- 'app/frontend/shared/graphql/types.ts'
- 'app/frontend/shared/types/config.ts'
include:
- 'app/frontend/**/*'
- '.eslint-plugin-zammad/**/*'
Markdownlint:
required_executable: 'pnpm'
enabled: true
command: ['pnpm', 'lint:md:cmd']
flags: ['*.md', '**/*.md', '#node_modules', '#**/node_modules']
exclude:
- 'node_modules'
include:
- '**/*.md'
PostCheckout:
ALL:
enabled: false
PostCommit:
ALL:
enabled: false
PostMerge:
ALL:
enabled: false
PostRewrite:
ALL:
enabled: false
PrePush:
ALL:
enabled: false
CustomScript:
enabled: true
description: 'Verify GraphQL introspection file is not empty.'
required_executable: 'bash'
command: ['bash', '-c', 'test -s app/graphql/graphql_introspection.json']
on_warn: fail
PreRebase:
ALL:
enabled: false
PrepareCommitMsg:
ALL:
enabled: false