-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
73 lines (67 loc) · 1.92 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
73 lines (67 loc) · 1.92 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
# Pre-commit hooks configuration
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
# General pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: no-commit-to-branch
args: ['--branch', 'main', '--branch', 'master']
- id: check-added-large-files
args: ['--maxkb=1024']
- id: check-case-conflict
- id: check-merge-conflict
- id: check-xml
- id: check-yaml
args: ['--allow-multiple-documents']
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace
args: ['--markdown-linebreak-ext=md']
- id: mixed-line-ending
args: ['--fix=lf']
- id: fix-byte-order-marker
# Markdown linting
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.48.0
hooks:
- id: markdownlint
args: ['--fix']
# C# code formatting and analysis
- repo: https://github.com/dotnet/format
rev: v5.1.225507
hooks:
- id: dotnet-format
name: dotnet-format
entry: dotnet format --verify-no-changes
language: system
types: ['c#']
pass_filenames: false
# Dockerfile linting
- repo: local
hooks:
- id: hadolint
name: Lint Dockerfiles
entry: hadolint
language: system
files: ^docker/Dockerfile$
exclude: ^\.git/.*$
# YAML best practices
- repo: https://github.com/adrienverge/yamllint
rev: v1.38.0
hooks:
- id: yamllint
name: yamllint
entry: yamllint
language: python
types: [yaml]
exclude: ^\.github/
# Advanced secrets scanning
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
name: detect-secrets
entry: detect-secrets-hook --baseline .secrets.baseline
language: python