-
Notifications
You must be signed in to change notification settings - Fork 346
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
55 lines (48 loc) · 1.84 KB
/
.pre-commit-config.yaml
File metadata and controls
55 lines (48 loc) · 1.84 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
---
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2026 The Linux Foundation
# Pre-commit hooks for OpenDaylight projects
# Install: pip install pre-commit && pre-commit install
# Run: pre-commit run --all-files
default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
hooks:
- id: trailing-whitespace
exclude: '^.*\.(bin|patch|diff|xml|XML|yang|YANG)$'
- id: end-of-file-fixer
exclude: '^.*\.(bin|patch|diff|xml|XML|yang|YANG)$'
- id: check-yaml
args: [--allow-multiple-documents]
- id: check-xml
- id: check-json
- id: check-added-large-files
args: ["--maxkb=10240"] # 10MB
- id: check-merge-conflict
- id: check-case-conflict
- id: mixed-line-ending
args: ["--fix=lf"]
exclude: '^.*\.(bin|patch|diff|xml|XML|yang|YANG)$'
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: a30f0d816e5062a67d87c8de753cfe499672b959 # frozen: v1.5.5
hooks:
- id: remove-tabs
exclude: '^(.*\.go|.*\.bin|docs/make.bat|docs/Makefile|.*\.patch|.*\.diff|.*\.xml|.*\.XML|.*\.yang|.*\.YANG)$'
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: a23f6b85d0fdd5bb9d564e2579e678033debbdff # frozen: v0.10.0.1
hooks:
- id: shellcheck
args: ["-x", "--severity=warning"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: f12edd9c7be1c20cfa42420fd0e6df71e42b51ea # frozen: v4.0.0-alpha.8
hooks:
- id: prettier
types_or: [yaml, markdown]
exclude: '^(.*\.template|.*\.patch|.*\.diff)$'
- repo: https://github.com/adrienverge/yamllint
rev: 81e9f98ffd059efe8aa9c1b1a42e5cce61b640c6 # frozen: v1.35.1
hooks:
- id: yamllint
args: ["-c", ".yamllint"]