forked from facebookincubator/axiom
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
89 lines (89 loc) · 3 KB
/
.pre-commit-config.yaml
File metadata and controls
89 lines (89 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Copyright (c) Meta Platforms, Inc. and its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# See https://pre-commit.com for more information
# General excludes, files can also be excluded on a hook level
exclude: ^velox/.*|^build/.*|^cmake-build-.*|^scripts/.*
default_install_hook_types: [pre-commit, pre-push]
repos:
- repo: meta
hooks:
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- repo: local
hooks:
- id: license-header
name: license-header
description: Add missing license headers.
entry: ./scripts/license-header.py
args: [-i]
language: python
additional_dependencies: [regex]
require_serial: true
- repo: https://github.com/BlankSpruce/gersemi
rev: 0.21.0
hooks:
- id: gersemi
name: CMake formatter
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v21.1.2
hooks:
- id: clang-format
files: \.(cpp|cc|c|h|hpp|inc|cu|cuh|clcpp|mm|metal)$
# Python
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.9
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
args: [-x, --severity=warning]
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.11.0-1
hooks:
- id: shfmt
# w: write changes, s: simplify, i set indent to 2 spaces
args: [-w, -s, -i, '2']
# The following checks mostly target GitHub Actions workflows.
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.37.0
hooks:
- id: yamllint
args: [--format, parsable, --strict]
exclude: .*\.clang-(tidy|format)|\.github/workflows/.*|\..*-format\.yaml|\.pre-commit-config\.yaml
- repo: https://github.com/google/yamlfmt
rev: v0.16.0
hooks:
- id: yamlfmt
exclude: .*\.clang-(tidy|format)|\.github/workflows/.*|\..*-format\.yaml|\.pre-commit-config\.yaml
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.7.0
hooks:
- id: zizmor
- repo: https://github.com/mpalmer/action-validator
rev: 2f8be1d2066eb3687496a156d00b4f1b3ea7b028
hooks:
- id: action-validator