-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
104 lines (103 loc) · 4.15 KB
/
.pre-commit-config.yaml
File metadata and controls
104 lines (103 loc) · 4.15 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Copyright (C) 2025 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
default_language_version:
# force all unspecified python hooks to run python3
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
- repo: https://github.com/crate-ci/typos
rev: v1.33.1 # Updated 2025/06
hooks:
- id: typos
- 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
# defaults to: LICENSE.txt
- HEADER
- id: insert-license
name: insert-license-cpp
files: \.(c|cc|cxx|cpp|h|hpp|hxx|inl|h.in)$
args:
- --license-filepath
# defaults to: LICENSE.txt
- HEADER
- --comment-style
- // # defaults to: #
- id: remove-tabs
name: remove-tabs
files: \.(py)$
args: [--whitespaces-count, '4']
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.1.0 # Updated 2025/06
hooks:
- id: black
language_version: python3.10
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.16.0 # Last checked 2025/06
hooks:
- id: mypy
language: system
exclude: >-
^(assembler_tools/hec-assembler-tools/assembler/common/run_config\.py|
*assembler_tools/hec-assembler-tools/assembler/instructions/|
*assembler_tools/hec-assembler-tools/assembler/memory_model/|
*assembler_tools/hec-assembler-tools/assembler/stages/asm_scheduler\.py|
*assembler_tools/hec-assembler-tools/assembler/stages/scheduler\.py|
*assembler_tools/hec-assembler-tools/debug_tools/main\.py|
*assembler_tools/hec-assembler-tools/debug_tools/xinst_timing_check/|
*assembler_tools/hec-assembler-tools/he_as\.py|
*assembler_tools/hec-assembler-tools/linker/__init__\.py|
*assembler_tools/hec-assembler-tools/linker/instructions/__init__\.py|
*assembler_tools/hec-assembler-tools/assembler/spec_config/isa_spec.py)
args: ["--follow-imports=skip", "--install-types", "--non-interactive"]
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
exclude: >-
^(assembler_tools/hec-assembler-tools/assembler/common/run_config\.py|
*assembler_tools/hec-assembler-tools/assembler/instructions/|
*assembler_tools/hec-assembler-tools/assembler/memory_model/|
*assembler_tools/hec-assembler-tools/assembler/stages/asm_scheduler\.py|
*assembler_tools/hec-assembler-tools/assembler/stages/scheduler\.py|
*assembler_tools/hec-assembler-tools/debug_tools/main\.py|
*assembler_tools/hec-assembler-tools/debug_tools/xinst_timing_check/|
*assembler_tools/hec-assembler-tools/he_as\.py|
*assembler_tools/hec-assembler-tools/linker/__init__\.py|
*assembler_tools/hec-assembler-tools/linker/instructions/__init__\.py|
*assembler_tools/hec-assembler-tools/assembler/spec_config/isa_spec.py)
args:
- -rn # Only display messages
- -sn # Don't display the score
- --source-roots=p-isa_tools/kerngen,assembler_tools/hec-assembler-tools
- id: clang-format-14
name: clang-format-14
entry: clang-format-14
language: system
files: \.(c|cc|cxx|cpp|h|hpp|hxx|inl)$
args: ["-i", "--style=file"]
- id: cpplint
name: cpplint
entry: cpplint
language: system
files: \.(c|cc|cxx|cpp|h|hpp|hxx)$
args:
- --recursive
- --filter=-build/c++17