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