-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.pre-commit-config.yaml
65 lines (62 loc) · 1.61 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
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/google/yamlfmt
rev: v0.11.0
hooks:
- id: yamlfmt
exclude: .clang-format
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.4.2
hooks:
- id: ruff
- id: ruff-format
- repo: https://github.com/rhysd/actionlint
rev: v1.6.27
hooks:
- id: actionlint
- repo: https://github.com/pre-commit/pre-commit-hooks
# this should go last since it will fix line endings broken by other tools
rev: v4.6.0
hooks:
- id: trailing-whitespace
# The pre-commit check on CI detects some whitespace changes if we include .github
exclude: .github
- id: check-added-large-files
- id: check-case-conflict
- id: mixed-line-ending
args: [--fix=lf]
- id: end-of-file-fixer
- id: check-yaml
- id: check-xml
- id: check-json
- id: pretty-format-json
args: [--autofix, --no-sort-keys, --indent=4]
exclude: .*\.ipynb$
- id: check-symlinks
- id: debug-statements
- id: fix-byte-order-marker
- repo: local
hooks:
- id: dotnet-tool-restore
name: Install .NET tools
entry: dotnet tool restore
language: system
types:
- c#
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.