-
Notifications
You must be signed in to change notification settings - Fork 659
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
98 lines (97 loc) · 3.96 KB
/
.pre-commit-config.yaml
File metadata and controls
98 lines (97 loc) · 3.96 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
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
---
# https://pre-commit.com/#installation
default_stages: [pre-commit, pre-push]
default_language_version:
# force all unspecified Python hooks to run python3
python: python3
minimum_pre_commit_version: '3.2.0'
repos:
- repo: meta
hooks:
- id: identity
name: run identity check
description: check you have set your git identity
- id: check-hooks-apply
name: run check hooks apply
description: check that all the hooks apply to the repository
- repo: https://github.com/codespell-project/codespell
rev: v2.4.2
hooks:
- id: codespell
name: run codespell
description: check spelling with codespell
exclude: ^src/Lucene\.Net\.Analysis\.Common/Analysis/../.*\.rslp$|^.*Lucene\.Net\.Tests.*$
args: [--ignore-words=.github/linters/codespell.txt]
- repo: https://github.com/oxipng/oxipng
rev: v10.1.1
hooks:
- id: oxipng
name: run oxipng
description: check PNG files with oxipng
args: [ '--fix', '-o', '4', '--strip', 'safe', '--alpha' ]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
name: run trailing-whitespace
description: trims trailing whitespace
files: \.(bat|config|json|md|props|ps1|rdf|targets|tmpl|xml|ya?ml)$
args: [--markdown-linebreak-ext=md]
- id: check-ast
name: run check-ast
description: check Python files for syntax errors
- id: check-builtin-literals
name: run check-builtin-literals
description: check Python files for proper use of built-in literals
- id: check-case-conflict
name: run check-case-conflict
description: check for case conflicts in file names
- id: check-executables-have-shebangs
name: run check-executables-have-shebangs
description: check that executable scripts have shebang lines
- id: check-illegal-windows-names
name: run check-illegal-windows-names
description: check for Windows-illegal file names
- id: check-json
name: run check-json
description: check JSON files for syntax errors
- id: check-merge-conflict
name: run check-merge-conflict
description: check for merge conflict markers
- id: check-vcs-permalinks
name: run check-vcs-permalinks
description: ensures that links to vcs websites are permalinks
- id: check-xml
name: run check-xml
description: attempts to load all xml files to verify syntax
- id: check-yaml
name: run check-yaml
description: attempts to load all yaml files to verify syntax
- id: debug-statements
name: run debug-statements
description: check for debugger imports and py37+ `breakpoint()` calls in python source.
- id: detect-private-key
name: run detect-private-key
description: checks for the existence of private keys
- id: forbid-submodules
name: run forbid-submodules
description: forbids any submodules in the repository
- id: fix-byte-order-marker
name: run fix-byte-order-marker
description: fixes files with UTF-8 byte order markers