-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy path.pre-commit-config.yaml
105 lines (94 loc) · 2.88 KB
/
.pre-commit-config.yaml
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
105
# Copyright (c) 2024 RapidStream Design Automation, Inc. and contributors.
# All rights reserved. The contributor(s) of this file has/have agreed to the
# RapidStream Contributor License Agreement.
exclude: .*\.patch
repos:
############################
# Built-in Common Checks #
############################
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
args:
- --maxkb=1024
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: file-contents-sorter
files: (.gitignore|requirements.(txt|in))$
- id: fix-byte-order-marker
- id: forbid-new-submodules
- id: forbid-submodules
- id: mixed-line-ending
- id: pretty-format-json
args:
- --autofix
- --indent=4
- id: trailing-whitespace
#####################
# Auto Formatting #
#####################
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.7
hooks:
- id: clang-format
files: \.(c|cc|cpp|h|hpp)$
- repo: https://github.com/keith/pre-commit-buildifier
rev: 8.0.0
hooks:
- id: buildifier
- id: buildifier-lint
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.2
hooks:
- id: ruff
args: [ --fix, --unsafe-fixes ]
- id: ruff-format
#############
# Linting #
#############
- repo: https://github.com/codespell-project/codespell
rev: "v2.3.0"
hooks:
- id: codespell
types_or: [asciidoc, python, markdown, rst]
additional_dependencies: [tomli]
###############
# Copyright #
###############
- repo: https://github.com/google/pre-commit-tool-hooks
rev: v1.2.5
hooks:
- id: check-links
- id: check-copyright
args:
- --copyright
- |+
Copyright (c) YYYY RapidStream Design Automation, Inc. and contributors.
All rights reserved. The contributor(s) of this file has/have agreed to the
RapidStream Contributor License Agreement.
- --skip_pattern
- "(?:\
LICENSE|VERSION|requirements_lock.txt|_redirects|\
\\.(?:ico|json|v|sv|vhd|bin|tcl|rst|xci|xml|csv|rpt|bd|ini|ipynb|lock|gitignore|pptx|svg|in|td|txt|bazelrc|actrc)\
)$"
- --custom_format
- '\.(rs|ts|tsx|mjs|cjs|c|hpp)$'
- ""
- "// "
- ""