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 | # ----------------------------------------------------------------------- |
| 12 | |
| 13 | # ----------------------------------------------------------------------- |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 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 | # |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame^] | 20 | # http://www.apache.org/licenses/LICENSE-2.0 |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 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 | # ----------------------------------------------------------------------- |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame^] | 34 | # .pre-commit-config-yaml 2024-04-10 v0.3 |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 35 | # ----------------------------------------------------------------------- |
| 36 | |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame^] | 37 | # ci: |
| 38 | # skip: [sync] |
| 39 | |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 40 | repos: |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame^] | 41 | # Sync from repo |
| 42 | - repo: https://github.com/pre-commit/pre-commit-hooks |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 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 |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame^] | 49 | |
| 50 | - repo: https://github.com/koalaman/shellcheck-precommit |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 51 | rev: v0.10.0 |
| 52 | hooks: |
| 53 | - id: shellcheck |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame^] | 54 | |
| 55 | - repo: https://github.com/adrienverge/yamllint.git |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 56 | rev: v1.35.1 |
| 57 | hooks: |
| 58 | - id: yamllint |
| 59 | |
| 60 | ## ----------------------------------------------------------------------- |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame^] | 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 | ## ----------------------------------------------------------------------- |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 75 | ## [SOURCE] Python |
| 76 | ## ----------------------------------------------------------------------- |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame^] | 77 | # - repo: https://github.com/psf/black |
| 78 | # rev: 22.10.0 |
| 79 | # hooks: |
| 80 | # - id: black |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 81 | |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame^] | 82 | # - repo: https://github.com/PyCQA/doc8 |
| 83 | # rev: v1.1.1 |
| 84 | # hooks: |
| 85 | # - id: doc8 |
| 86 | |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 87 | # ------------------------------------------------------------------- |
| 88 | # https://docs.python.org/3/library/re.html#regular-expression-syntax |
| 89 | # ------------------------------------------------------------------- |
| 90 | exclude: | |
| 91 | (?x)^( |
| 92 | ^jjb/.* | |
| 93 | ^makefiles/.* | |
| 94 | ^lf/.* | |
| 95 | ^.venv/.* | |
Joey Armstrong | 342430f | 2024-04-10 10:36:34 -0400 | [diff] [blame^] | 96 | ^jenkins-scripts/.* | |
| 97 | ^lf-ansible/.* | |
| 98 | ^packer/.* | |
| 99 | ^test/.* | |
| 100 | ^jjb/pipeline/voltha/voltha-physical-soak-dt-tests.groovy |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 101 | )$ |
| 102 | |
| 103 | # [SEE ALSO] |
| 104 | # ----------------------------------------------------------------------- |
Joey Armstrong | 9886cc8 | 2024-04-04 11:34:51 -0400 | [diff] [blame] | 105 | |
| 106 | # [EOF] |