Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 1 | --- |
| 2 | |
| 3 | # ----------------------------------------------------------------------- |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame] | 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 | # ----------------------------------------------------------------------- |
Joey Armstrong | 42c2a64 | 2024-04-18 15:44:43 -0400 | [diff] [blame] | 12 | # [HOOKS: disabled] |
| 13 | # - reuse |
| 14 | # ----------------------------------------------------------------------- |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame] | 15 | |
| 16 | # ----------------------------------------------------------------------- |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 17 | # Copyright 2024 Open Networking Foundation Contributors |
| 18 | # |
| 19 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 20 | # you may not use this file except in compliance with the License. |
| 21 | # You may obtain a copy of the License at |
| 22 | # |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame] | 23 | # http://www.apache.org/licenses/LICENSE-2.0 |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 24 | # |
| 25 | # Unless required by applicable law or agreed to in writing, software |
| 26 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 27 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 28 | # See the License for the specific language governing permissions and |
| 29 | # limitations under the License. |
| 30 | # ----------------------------------------------------------------------- |
| 31 | # SPDX-FileCopyrightText: 2024 Open Networking Foundation Contributors |
| 32 | # SPDX-License-Identifier: Apache-2.0 |
| 33 | # ----------------------------------------------------------------------- |
| 34 | # See https://pre-commit.com for more information |
| 35 | # See https://pre-commit.com/hooks.html for more hooks |
| 36 | # ----------------------------------------------------------------------- |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame] | 37 | # .pre-commit-config-yaml 2024-04-10 v0.3 |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 38 | # ----------------------------------------------------------------------- |
| 39 | |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame] | 40 | # ci: |
| 41 | # skip: [sync] |
| 42 | |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 43 | repos: |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame] | 44 | # Sync from repo |
| 45 | - repo: https://github.com/pre-commit/pre-commit-hooks |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 46 | rev: v4.5.0 |
| 47 | hooks: |
| 48 | - id: trailing-whitespace |
| 49 | - id: end-of-file-fixer |
| 50 | - id: check-yaml |
| 51 | - id: check-added-large-files |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame] | 52 | |
| 53 | - repo: https://github.com/koalaman/shellcheck-precommit |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 54 | rev: v0.10.0 |
| 55 | hooks: |
| 56 | - id: shellcheck |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame] | 57 | |
| 58 | - repo: https://github.com/adrienverge/yamllint.git |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 59 | rev: v1.35.1 |
| 60 | hooks: |
| 61 | - id: yamllint |
| 62 | |
| 63 | ## ----------------------------------------------------------------------- |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame] | 64 | ## [SOURCE] REUSE License Checking |
| 65 | ## ----------------------------------------------------------------------- |
Joey Armstrong | 42c2a64 | 2024-04-18 15:44:43 -0400 | [diff] [blame] | 66 | # - repo: https://github.com/fsfe/reuse-tool |
| 67 | # rev: v3.0.2 |
| 68 | # hooks: |
| 69 | # - id: reuse |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame] | 70 | # - id: add-license-headers |
| 71 | # args: |
| 72 | # - --custom_copyright=custom copyright phrase |
| 73 | # - --custom_template=template_name |
| 74 | # - --custom_license=license_name |
| 75 | # - --ignore_license_check |
| 76 | # - --start_year=2023 |
| 77 | |
| 78 | ## ----------------------------------------------------------------------- |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 79 | ## [SOURCE] Python |
| 80 | ## ----------------------------------------------------------------------- |
Joey Armstrong | 42c2a64 | 2024-04-18 15:44:43 -0400 | [diff] [blame] | 81 | |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame] | 82 | # - repo: https://github.com/psf/black |
| 83 | # rev: 22.10.0 |
| 84 | # hooks: |
| 85 | # - id: black |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 86 | |
Joey Armstrong | 42c2a64 | 2024-04-18 15:44:43 -0400 | [diff] [blame] | 87 | - repo: https://github.com/PyCQA/doc8 |
| 88 | rev: v1.1.1 |
| 89 | hooks: |
| 90 | - id: doc8 |
| 91 | |
| 92 | - repo: https://github.com/pre-commit/pygrep-hooks |
| 93 | rev: v1.10.0 |
| 94 | hooks: |
| 95 | - id: rst-backticks |
| 96 | - id: rst-directive-colons |
| 97 | - id: rst-inline-touching-normal |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame] | 98 | |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 99 | # ------------------------------------------------------------------- |
| 100 | # https://docs.python.org/3/library/re.html#regular-expression-syntax |
| 101 | # ------------------------------------------------------------------- |
| 102 | exclude: | |
| 103 | (?x)^( |
| 104 | ^jjb/.* | |
| 105 | ^makefiles/.* | |
| 106 | ^lf/.* | |
| 107 | ^.venv/.* | |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame] | 108 | ^jenkins-scripts/.* | |
| 109 | ^lf-ansible/.* | |
| 110 | ^packer/.* | |
| 111 | ^test/.* | |
| 112 | ^jjb/pipeline/voltha/voltha-physical-soak-dt-tests.groovy |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 113 | )$ |
| 114 | |
| 115 | # [SEE ALSO] |
| 116 | # ----------------------------------------------------------------------- |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 117 | |
| 118 | # [EOF] |