forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
151 lines (139 loc) · 4.47 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
151 lines (139 loc) · 4.47 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
140
141
142
143
144
145
146
147
148
149
150
151
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
#
# Exclusions:
# - Lock files (generated): composer.lock, package-lock.json
# - Minified files: *.min.js, *.min.css, *-min.js, *-min.css
# - Source maps: *.js.map, *.css.map
# - PHPStan baseline files: .phpstan/baseline/ (generated PHP arrays)
# - Vendored/generated third-party code (alphabetized):
# - Documentation/EHI_Export/ (SchemaSpy + bower components)
# - gacl/ (phpGACL library)
# - interface/forms/eye_mag/js/shortcut.js-2-01-B/ (keyboard shortcut library)
# - interface/forms/questionnaire_assessments/lforms/ (LHC-Forms library)
# - interface/modules/custom_modules/oe-module-comlink-telehealth/public/assets/js/dist/ (webpack build)
# - interface/modules/zend_modules/public/js/lib/ (jQuery + plugins)
# - interface/modules/zend_modules/public/xsd/ (HL7 CDA schemas)
# - interface/modules/zend_modules/public/xsl/ (XSL transformations)
# - interface/super/rules/www/js/cdr-multiselect/ (jQuery multiselect plugins)
# - library/classes/fpdf/ (FPDF library)
# - library/fonts/ (Adobe font metrics files)
# - library/js/{Category,Document}TreeMenu.js, SearchHighlight.js (vendored plugins)
# - library/smarty_legacy/ (Smarty template engine)
# - public/assets/modified/ (modified third-party libs)
# - swagger/ (Swagger UI distribution)
exclude: |
(?x)^(
# Lock files (generated)
(.*/)?(composer\.lock|package-lock\.json)$|
# Minified files and source maps
.*[.\-]min\.(js|css)$|
.*\.(js|css)\.map$|
# PHPStan baseline files (generated)
\.phpstan/baseline/|
# Vendored/generated third-party code (alphabetized)
Documentation/EHI_Export/|
gacl/|
interface/forms/eye_mag/js/shortcut\.js-2-01-B/|
interface/forms/questionnaire_assessments/lforms/|
interface/modules/custom_modules/oe-module-comlink-telehealth/public/assets/js/dist/|
interface/modules/zend_modules/public/js/lib/|
interface/modules/zend_modules/public/xsd/|
interface/modules/zend_modules/public/xsl/|
interface/super/rules/www/js/cdr-multiselect/|
library/classes/fpdf/|
library/fonts/|
library/js/(CategoryTreeMenu|DocumentTreeMenu|SearchHighlight)\.js$|
library/smarty_legacy/|
public/assets/modified/|
swagger/
)
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
- 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/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
hooks:
- id: pretty-format-yaml
args:
- --autofix
- --indent=2
- --preserve-quotes
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
# Configuration in .codespellrc
# actionlint for verifying correct syntax in GitHub Actions workflows.
- repo: https://github.com/rhysd/actionlint
rev: v1.7.10
hooks:
- id: actionlint-docker
- repo: local
hooks:
- id: php-syntax-check
name: PHP Syntax Check
entry: php -l
language: system
files: \.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 phpcbf --
language: system
files: \.php$
- id: phpcs
name: PHP_CodeSniffer
entry: composer phpcs --
language: system
files: \.php$
- id: phpstan
name: PHPStan Static Analysis
entry: composer phpstan --
language: system
files: \.php$
pass_filenames: false
- id: rector
name: Rector
entry: composer rector-fix --
language: system
files: \.php$
- id: composer-require-checker
name: Composer Require Checker
entry: composer require-checker
language: system
files: ^(composer\.json|.*\.php)$
pass_filenames: false
- id: conventional-commits
name: Conventional Commits
entry: composer conventional-commits:check --
language: system
stages:
- commit-msg