1# Licensed to the Apache Software Foundation (ASF) under one 2# or more contributor license agreements. See the NOTICE file 3# distributed with this work for additional information 4# regarding copyright ownership. The ASF licenses this file 5# to you under the Apache License, Version 2.0 (the 6# "License"); you may not use this file except in compliance 7# with the License. You may obtain a copy of the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, 12# software distributed under the License is distributed on an 13# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14# KIND, either express or implied. See the License for the 15# specific language governing permissions and limitations 16# under the License. 17--- 18default_stages: [pre-commit, pre-push] 19default_language_version: 20 # force all unspecified Python hooks to run python3 21 python: python3 22minimum_pre_commit_version: "3.2.0" 23repos: 24 - repo: meta 25 hooks: 26 - id: identity 27 - id: check-hooks-apply 28 - repo: https://github.com/gitleaks/gitleaks 29 rev: v8.28.0 30 hooks: 31 - id: gitleaks 32 name: run gitleaks 33 description: check for secrets with gitleaks 34 - repo: https://github.com/Lucas-C/pre-commit-hooks 35 rev: v1.5.5 36 hooks: 37 - id: insert-license 38 name: add license for all Markdown files 39 files: \.md$ 40 args: 41 - --comment-style 42 - '<!--||-->' 43 - --license-filepath 44 - .github/workflows/license-templates/LICENSE.txt 45 - --fuzzy-match-generates-todo 46 - repo: https://github.com/pre-commit/pre-commit-hooks 47 rev: v6.0.0 48 hooks: 49 - id: check-case-conflict 50 - id: check-illegal-windows-names 51 - id: check-merge-conflict 52 - id: check-vcs-permalinks 53 - id: end-of-file-fixer 54 files: (m|M)akefile$|\.(asp|bas|bat|c|cl|cmd|common|component|cpp|cxx|dxp|el|h|hrc|hxx|idl|in|ini|java|js|lst|m|m4|map|md|mk|mm|mod|pas|php|pl|pm|pmk|py|rc|rdf|rng|sdi|sh|src|ulf|vbs|xba|xcs|xcu|xdl|xhp|xlb|xmi|xml|xsd|xslt?|ya?ml)$|^ext_libraries/.*$|^test/.*$ 55 - id: fix-byte-order-marker 56 - id: mixed-line-ending 57 files: \.(asp|bas|c|cl|cmd|common|component|cpp|cxx|dxp|el|h|hrc|hxx|idl|in|ini|java|js|lst|m|m4|map|md|mk|mm|mod|pas|php|pl|pm|pmk|py|rc|rdf|rng|sdi|sh|src|ulf|vbs|xba|xcs|xcu|xdl|xhp|xlb|xmi|xsd|xslt?|ya?ml)$|^main/accessibility/.*$|^main/afms/.*$|^main/animations/.*$|^main/apache-commons/.*$|^test/testgui/.*$ 58 - id: trailing-whitespace 59 files: (m|M)akefile$|\.(asp|bas|bat|c|cl|cmd|common|component|cpp|cxx|dxp|el|h|hrc|hxx|idl|in|ini|java|js|lst|m|m4|map|md|mk|mm|mod|pas|php|pl|pm|pmk|py|rc|rdf|rng|sdi|sh|src|ulf|vbs|xba|xcs|xcu|xdl|xhp|xlb|xmi|xml|xsd|ya?ml)$ 60 args: [--markdown-linebreak-ext=md] 61 - repo: https://github.com/codespell-project/codespell 62 rev: v2.4.1 63 hooks: 64 - id: codespell 65 name: run codespell 66 description: check spelling with codespell 67 args: [--ignore-words=.github/linters/codespell.txt] 68 exclude: ^extras/ 69 - repo: https://github.com/igorshubovych/markdownlint-cli 70 rev: v0.45.0 71 hooks: 72 - id: markdownlint 73 name: run markdownlint 74 description: check Markdown files with markdownlint 75 args: [--config=.github/linters/.markdown-lint.yml] 76 types: [markdown] 77 files: \.md$ 78