forked from Trauma-Station/Trauma-Station
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
31 lines (29 loc) · 1.15 KB
/
.pre-commit-config.yaml
File metadata and controls
31 lines (29 loc) · 1.15 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
# TraumaStation's pre-commit.com config
# You don't have to install it yourself, CI applies fixes to PRs automatically (but it's still good to have)
# Use `pip3 install pre-commit` or use your system package.
repos:
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: "v6.0.0"
hooks:
# File checkers
- id: check-yaml
# only check prototypes, maps would be too slow
files: "^Resources/Prototypes/_Trauma/.*\\.yml$"
# !type:... doesn't work without somehow loading SS14, which would probably make commits take years
args: ["--unsafe"]
- id: check-json
# only need to check meta.json files
files: "^Resources/Textures/_Trauma/.*/meta\\.json$"
- id: check-xml
# Check all ui XAML files
# Can't check guidebook "xml" as it is a monster
files: "^Content.Trauma.Client/.*\\.xaml$"
types: ["text"]
- id: check-merge-conflict
# Fixers that can and will change commits to PRs
- id: end-of-file-fixer
- id: trailing-whitespace
- id: fix-byte-order-marker
exclude: "^Resources/Changelog/Changelog.yml$" # BOM removal farms conflicts for every pr changelog
ci:
autofix_commit_msg: "[pre-commit] automated pr fixes"