File size: 906 Bytes
cb65407 | 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 | # 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.2.1"
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: "v17.0.6"
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: "v4.5.0"
hooks:
- id: "trailing-whitespace"
- id: "mixed-line-ending"
args:
- "--fix=lf"
- id: "end-of-file-fixer"
exclude: "^docs/source/diagrams/(svg|xml)/"
|