xref: /trunk/.pre-commit-config.yaml (revision 78190a370f7d7129fed9a7e70ca122eaae71ce1d)
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: "2.17.0"
23repos:
24  - repo: meta
25    hooks:
26      - id: identity
27      - id: check-hooks-apply
28  - repo: https://github.com/pre-commit/pre-commit-hooks
29    rev: v5.0.0
30    hooks:
31      - id: check-case-conflict
32      - id: check-illegal-windows-names
33      - id: check-merge-conflict
34      - id: check-vcs-permalinks
35      - id: end-of-file-fixer
36        files: \.(hxx|java|md|mk|ya?ml)$
37      - id: mixed-line-ending
38        files: ^main/.*\.(c|h)xx$
39  - repo: https://github.com/codespell-project/codespell
40    rev: v2.2.6
41    hooks:
42      - id: codespell
43        name: run codespell
44        description: check spelling with codespell
45        args: [--ignore-words=.github/linters/codespell.txt]
46        exclude: ^extras/
47