-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
118 lines (105 loc) · 3.32 KB
/
.pre-commit-config.yaml
File metadata and controls
118 lines (105 loc) · 3.32 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
# See https://pre-commit.com for more information
repos:
# Local hooks that run in Docker containers
- repo: local
hooks:
- id: composer-validate
name: Validate composer.json
entry: docker-compose run --rm test-code-style composer validate --strict
language: system
files: composer\.(json|lock)$
pass_filenames: false
- id: php-lint
name: PHP Syntax Check
entry: docker-compose run --rm test-lint
language: system
files: \.php$
pass_filenames: false
- id: php-code-style
name: PHP Code Style (Laravel Pint)
entry: docker-compose run --rm test-code-style
language: system
files: \.php$
pass_filenames: false
- id: phpstan
name: PHPStan Static Analysis
entry: docker-compose run --rm test-phpstan
language: system
files: \.php$
pass_filenames: false
- id: psalm
name: Psalm Static Analysis
entry: docker-compose run --rm test-psalm
language: system
files: \.php$
pass_filenames: false
- id: pest
name: Pest Tests
entry: docker-compose run --rm tests ./vendor/bin/pest --no-coverage
language: system
files: \.(php|xml)$
pass_filenames: false
- id: security-check
name: Security Vulnerabilities Check
entry: docker-compose run --rm test-security
language: system
files: composer\.lock$
pass_filenames: false
- id: phpmd
name: PHP Mess Detector
entry: docker-compose run --rm test-phpmd
language: system
files: \.php$
pass_filenames: false
- id: phan
name: Phan Static Analysis
entry: docker-compose run --rm test-phan
language: system
files: \.php$
pass_filenames: false
- id: rector
name: Rector Code Quality
entry: docker-compose run --rm test-rector
language: system
files: \.php$
pass_filenames: false
- id: test-coverage
name: Pest Test Coverage
entry: docker-compose run --rm tests ./vendor/bin/pest --coverage --min=100
language: system
files: \.php$
pass_filenames: false
stages: [pre-push]
- id: type-coverage
name: Pest Type Coverage
entry: docker-compose run --rm tests ./vendor/bin/pest --type-coverage --min=100
language: system
files: \.php$
pass_filenames: false
stages: [pre-push]
- id: mutation
name: Pest Mutation Testing
entry: docker-compose run --rm tests ./vendor/bin/pest --mutate --min=86 --everything --covered-only
language: system
files: \.php$
pass_filenames: false
stages: [pre-push]
# Standard pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
exclude: ^vendor/
- id: end-of-file-fixer
exclude: ^vendor/
- id: check-yaml
- id: check-added-large-files
args: ['--maxkb=1000']
- id: check-json
- id: check-xml
- id: mixed-line-ending
args: ['--fix=lf']
- id: check-merge-conflict
- id: check-case-conflict
- id: detect-private-key
- id: fix-byte-order-marker