blob: b9bf768040004ac79774375c140318080abde3e8 [file] [log] [blame]
Joey Armstrongdaffa902024-04-10 14:00:28 -04001---
2
3# -----------------------------------------------------------------------
4# [NOTE] - Propogate .pre-commit-config.yaml edits to all repositories!
5# -----------------------------------------------------------------------
6# [TODO]
7# - pre-commit yaml config exists individually within repositories.
8# - Generally lint config and benavior is consistent for all repos.
9# - Exclusions and bulk cleanup necessitate per-repo custom configs.
10# - Dynamically generate this config file from common and custom
11# -----------------------------------------------------------------------
12
13# -----------------------------------------------------------------------
14# Copyright 2024 Open Networking Foundation Contributors
15#
16# Licensed under the Apache License, Version 2.0 (the "License");
17# you may not use this file except in compliance with the License.
18# You may obtain a copy of the License at
19#
20# http://www.apache.org/licenses/LICENSE-2.0
21#
22# Unless required by applicable law or agreed to in writing, software
23# distributed under the License is distributed on an "AS IS" BASIS,
24# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
25# See the License for the specific language governing permissions and
26# limitations under the License.
27# -----------------------------------------------------------------------
28# SPDX-FileCopyrightText: 2024 Open Networking Foundation Contributors
29# SPDX-License-Identifier: Apache-2.0
30# -----------------------------------------------------------------------
31# See https://pre-commit.com for more information
32# See https://pre-commit.com/hooks.html for more hooks
33# -----------------------------------------------------------------------
34# .pre-commit-config-yaml 2024-04-10 v0.3
35# -----------------------------------------------------------------------
36
37# ci:
38# skip: [sync]
39
40repos:
41 # Sync from repo
42 - repo: https://github.com/pre-commit/pre-commit-hooks
43 rev: v4.5.0
44 hooks:
45 - id: trailing-whitespace
46 - id: end-of-file-fixer
47 - id: check-yaml
48 - id: check-added-large-files
49
50 - repo: https://github.com/koalaman/shellcheck-precommit
51 rev: v0.10.0
52 hooks:
53 - id: shellcheck
54
55 - repo: https://github.com/adrienverge/yamllint.git
56 rev: v1.35.1
57 hooks:
58 - id: yamllint
59
60## -----------------------------------------------------------------------
61## [SOURCE] REUSE License Checking
62## -----------------------------------------------------------------------
63# - repo: https://github.com/ansys/pre-commit-hooks
64# rev: v0.2.9
65# hooks:
66# - id: add-license-headers
67# args:
68# - --custom_copyright=custom copyright phrase
69# - --custom_template=template_name
70# - --custom_license=license_name
71# - --ignore_license_check
72# - --start_year=2023
73
74## -----------------------------------------------------------------------
75## [SOURCE] Python
76## -----------------------------------------------------------------------
77# - repo: https://github.com/psf/black
78# rev: 22.10.0
79# hooks:
80# - id: black
81
82# - repo: https://github.com/PyCQA/doc8
83# rev: v1.1.1
84# hooks:
85# - id: doc8
86
87# -------------------------------------------------------------------
88# https://docs.python.org/3/library/re.html#regular-expression-syntax
89# -------------------------------------------------------------------
90exclude: |
91 (?x)^(
92 ^jjb/.* |
93 ^makefiles/.* |
94 ^lf/.* |
95 ^.venv/.* |
96 ^jenkins-scripts/.* |
97 ^lf-ansible/.* |
98 ^packer/.* |
99 ^test/.* |
100 ^jjb/pipeline/voltha/voltha-physical-soak-dt-tests.groovy
101 )$
102
103# [SEE ALSO]
104# -----------------------------------------------------------------------
105
106# [EOF]