-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
106 lines (94 loc) · 2.22 KB
/
.pre-commit-config.yaml
File metadata and controls
106 lines (94 loc) · 2.22 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: ^composer\.lock$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args:
- --unsafe # Allow custom tags like !override in compose.yml
- id: check-added-large-files
- id: check-merge-conflict
- id: check-json
- id: pretty-format-json
args:
- --autofix
- --indent=2
- --no-sort-keys
exclude: ^composer\.json$
- id: mixed-line-ending
args:
- --fix=lf
- repo: https://github.com/google/yamlfmt
rev: v0.21.0
hooks:
- id: yamlfmt
- repo: https://github.com/rhysd/actionlint
rev: v1.7.10
hooks:
- id: actionlint
- repo: https://github.com/hadolint/hadolint
rev: v2.12.0
hooks:
- id: hadolint-docker
- repo: https://github.com/docker-compose-linter/pre-commit-dclint
rev: v3.1.0
hooks:
- id: dclint
- repo: local
hooks:
- id: php-syntax-check
name: PHP Syntax Check
entry: php -l
language: system
types:
- php
- id: composer-validate
name: Validate composer.json
entry: composer validate --strict
language: system
files: ^composer\.json$
pass_filenames: false
- id: composer-normalize
name: Normalize composer.json
entry: composer normalize
language: system
files: ^composer\.json$
pass_filenames: false
- id: phpcbf
name: PHP Code Beautifier and Fixer
entry: composer run-script phpcbf
language: system
types:
- php
pass_filenames: false
- id: phpcs
name: PHP_CodeSniffer
entry: composer run-script phpcs
language: system
types:
- php
pass_filenames: false
- id: phpstan
name: PHPStan Static Analysis
entry: composer run-script phpstan
language: system
types:
- php
pass_filenames: false
- id: rector
name: Rector
entry: composer run-script rector-fix
language: system
types:
- php
pass_filenames: false
- id: composer-require-checker
name: Composer Require Checker
entry: composer run-script require-checker
language: system
files: ^(composer\.json|src/.+\.php)$
pass_filenames: false