-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
73 lines (72 loc) · 2.28 KB
/
.pre-commit-config.yaml
File metadata and controls
73 lines (72 loc) · 2.28 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
# Copyright (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
default_language_version:
# force all unspecified python hooks to run python3.10
python: python3.10
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0 # Updated 2025/06
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: mixed-line-ending
- id: check-yaml
args:
- --allow-multiple-documents
- id: fix-byte-order-marker
- repo: https://github.com/crate-ci/typos
rev: v1.33.1 # Updated 2025/06
hooks:
- id: typos
args:
- --diff
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5 # Updated 2025/06
hooks:
- id: insert-license
name: insert-license-shell
files: \.(sh|py)$
args:
- --license-filepath=HEADER
- --use-current-year
- --allow-past-years
- --detect-license-in-X-top-lines=10
- --fuzzy-ratio-cut-off=50
- --remove-header
- id: insert-license
name: insert-license-cpp
files: \.(c|cc|cxx|cpp|h|hpp|hxx|inl|h.in)$
args:
- --license-filepath=HEADER
- --comment-style=//
- --use-current-year
- --allow-past-years
- --detect-license-in-X-top-lines=10
- --fuzzy-ratio-cut-off=50
- --remove-header
- id: remove-tabs
name: remove-tabs
files: \.(py)$
args: [--whitespaces-count, '4']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: ruff
args: [--fix] # Automatically fix issues when possible
- id: ruff-format # Replaces black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.16.0 # Last checked 2025/06
hooks:
- id: mypy
pass_filenames: false
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: "v18.1.2"
hooks:
- id: clang-format
exclude_types: [json] # skip *.json and *.JSON
args: ["--style=file"]
- repo: https://github.com/cpplint/cpplint
rev: "2.0.2"
hooks:
- id: cpplint