-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
81 lines (81 loc) · 2.77 KB
/
.pre-commit-config.yaml
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
default_stages: [pre-commit, pre-push]
default_install_hook_types: [pre-commit, pre-push, prepare-commit-msg, commit-msg]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: check-toml
- id: check-xml
- id: check-json
- id: pretty-format-json
args:
- "--autofix"
- "--indent=2"
- "--no-sort-keys"
- "--no-ensure-ascii"
exclude: 'client/OkeyClient/ProjectSettings/Packages/com\.unity\.testtools\.codecoverage/Settings\.json'
- id: end-of-file-fixer
exclude: |
(?x)^(
(.*\.(asset|meta|unity|prefab)$)|
client/OkeyClient/ProjectSettings/Packages/com\.unity\.testtools\.codecoverage/Settings\.json
)$
- id: trailing-whitespace
exclude: '.*\.(asset|meta|unity|prefab)$'
- id: fix-byte-order-marker
- id: check-executables-have-shebangs
exclude: '(client/OkeyClient/.*)|(server/OkeyServer/.*)'
- id: check-shebang-scripts-are-executable
- id: check-merge-conflict
- id: check-symlinks
- id: check-case-conflict
- id: detect-private-key
- id: mixed-line-ending
- repo: https://github.com/milin/giticket
rev: v1.3
hooks:
- id: giticket
args: ['--regex=\d+', '--format=GL-{ticket}: {commit_msg}', '--mode=regex_match'] # Optional
stages: [prepare-commit-msg]
- repo: local
hooks:
- id: dotnet-tool-restore
name: Install .NET tools
entry: dotnet tool restore
language: system
always_run: true
pass_filenames: false
stages:
- commit
- push
- post-checkout
- post-rewrite
description: Install the .NET tools listed at .config/dotnet-tools.json.
- id: csharpier
name: Run CSharpier on C# files
entry: dotnet tool run dotnet-csharpier
language: system
types:
- c#
description: CSharpier is an opinionated C# formatter inspired by Prettier.
- id: roslynator-OkeyServer
name: Run Roslynator on OkeyServer C# project
entry: dotnet tool run roslynator analyze server/OkeyServer/OkeyServer.csproj
language: system
files: '^server/OkeyServer/'
types:
- c#
verbose: true
pass_filenames: false
description: Roslynator is a static analysis tool
- id: roslynator-OkeyApi
name: Run Roslynator on OkeyApi C# project
entry: dotnet tool run roslynator analyze server/OkeyApi/OkeyApi.csproj
language: system
files: '^server/OkeyApi/'
types:
- c#
verbose: true
pass_filenames: false
description: Roslynator is a static analysis tool