forked from cocotb/cocotb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
51 lines (45 loc) · 1.19 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
# Copyright cocotb contributors
# Licensed under the Revised BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-3-Clause
exclude: "^.*/_vendor/"
repos:
# ruff with --fix should run before other formatting tools
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.8.3"
hooks:
# Run the linter.
- id: "ruff"
args:
- "--fix"
- "--exit-non-zero-on-fix"
# Run the formatter.
- id: ruff-format
- repo: "https://github.com/pre-commit/mirrors-clang-format"
rev: "v19.1.5"
hooks:
- id: "clang-format"
exclude: "^src/cocotb/share/include/(sv_vpi|vhpi|vpi)_user(_ext)?.h"
types_or: [c, c++]
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: "v5.0.0"
hooks:
- id: "trailing-whitespace"
- id: "mixed-line-ending"
args:
- "--fix=lf"
- id: "end-of-file-fixer"
exclude: "^docs/source/diagrams/(svg|xml)/"
- repo: https://github.com/henryiii/validate-pyproject-schema-store
rev: "2024.11.25"
hooks:
- id: validate-pyproject
- repo: local
hooks:
- id: "git-diff"
name: git diff
entry: git diff --exit-code
language: system
pass_filenames: false
always_run: true
ci:
autofix_prs: false