|
| 1 | +# SPDX-FileCopyrightText: 2025 ETH Zurich and University of Bologna |
| 2 | +# |
| 3 | +# SPDX-License-Identifier: Apache-2.0 |
| 4 | + |
| 5 | +# See https://pre-commit.com for more information |
| 6 | +# See https://pre-commit.com/hooks.html for more hooks |
| 7 | +--- |
| 8 | +exclude: | |
| 9 | + (?x)^( |
| 10 | + .*third_party.* |
| 11 | + | .*generated.* |
| 12 | + ) |
| 13 | +
|
| 14 | +repos: |
| 15 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 16 | + rev: v6.0.0 |
| 17 | + hooks: |
| 18 | + - id: check-added-large-files |
| 19 | + name: Check for added large files |
| 20 | + - id: trailing-whitespace |
| 21 | + name: Check for trailing whitespace |
| 22 | + - repo: local |
| 23 | + hooks: |
| 24 | + - id: reuse |
| 25 | + name: Check SPDX License Headers |
| 26 | + entry: scripts/reuse_skip_wrapper.py |
| 27 | + language: python |
| 28 | + stages: [pre-commit, pre-merge-commit, pre-push, manual] |
| 29 | + types: [text] |
| 30 | + exclude_types: [batch, svg, json, markdown] |
| 31 | + - repo: https://github.com/google/yapf |
| 32 | + rev: v0.43.0 |
| 33 | + hooks: |
| 34 | + - id: yapf |
| 35 | + name: Autoformat Python Files |
| 36 | + args: ["--in-place", "--parallel"] |
| 37 | + stages: [pre-commit, pre-merge-commit, pre-push, manual] |
| 38 | + - repo: https://github.com/pycqa/isort |
| 39 | + rev: 5.12.0 |
| 40 | + hooks: |
| 41 | + - id: isort |
| 42 | + name: Autoformat Python Imports |
| 43 | + args: ["--quiet"] |
| 44 | + stages: [pre-commit, pre-merge-commit, pre-push, manual] |
| 45 | + - repo: https://github.com/PyCQA/autoflake |
| 46 | + rev: v2.3.0 |
| 47 | + hooks: |
| 48 | + - id: autoflake |
| 49 | + name: Remove Unused Python Imports |
| 50 | + args: |
| 51 | + - "--remove-all-unused-imports" |
| 52 | + - "--ignore-init-module-imports" |
| 53 | + - "--in-place" |
| 54 | + stages: [pre-commit, pre-merge-commit, pre-push, manual] |
| 55 | + - repo: https://github.com/adrienverge/yamllint.git |
| 56 | + rev: v1.33.0 |
| 57 | + hooks: |
| 58 | + - id: yamllint |
| 59 | + name: Lint YAML Files |
| 60 | + stages: [pre-commit, pre-merge-commit, pre-push, manual] |
| 61 | + - repo: https://github.com/pre-commit/mirrors-clang-format |
| 62 | + rev: v21.1.2 |
| 63 | + hooks: |
| 64 | + - id: clang-format |
| 65 | + name: Autoformat C/C++ Files |
| 66 | + args: ["-i"] |
| 67 | + stages: [pre-commit, pre-merge-commit, pre-push, manual] |
0 commit comments