# 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)/"