|
| 1 | +# ******************************************************************************* |
| 2 | +# Copyright (c) 2026 Contributors to the Eclipse Foundation |
| 3 | +# |
| 4 | +# See the NOTICE file(s) distributed with this work for additional |
| 5 | +# information regarding copyright ownership. |
| 6 | +# |
| 7 | +# This program and the accompanying materials are made available under the |
| 8 | +# terms of the Apache License Version 2.0 which is available at |
| 9 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# SPDX-License-Identifier: Apache-2.0 |
| 12 | +# ******************************************************************************* |
| 13 | +repos: |
| 14 | + - repo: https://github.com/pre-commit/pre-commit-hooks |
| 15 | + rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # v6.0.0 |
| 16 | + hooks: |
| 17 | + - id: check-yaml |
| 18 | + - id: end-of-file-fixer |
| 19 | + exclude: requirements_lock.txt |
| 20 | + - id: trailing-whitespace |
| 21 | + - id: check-shebang-scripts-are-executable |
| 22 | + - id: check-executables-have-shebangs |
| 23 | + - id: check-added-large-files |
| 24 | + args: [--maxkb=50, --enforce-all] # increase or add git lfs if too strict |
| 25 | + - repo: https://github.com/google/yamlfmt |
| 26 | + rev: 21ca5323a9c87ee37a434e0ca908efc0a89daa07 # v0.21.0 |
| 27 | + hooks: |
| 28 | + - id: yamlfmt |
| 29 | + - repo: https://codeberg.org/fsfe/reuse-tool |
| 30 | + rev: a1bb792acda6fd0724936b4ebbdbc8eceb9c0459 # v6.2.0 |
| 31 | + hooks: |
| 32 | + - id: reuse-lint-file |
| 33 | + - repo: local |
| 34 | + hooks: |
| 35 | + - id: copyright |
| 36 | + name: Check and fix copyright headers with cr_checker |
| 37 | + entry: cr_checker/tool/pre-commit_wrapper --extensions h hpp c cpp rs rst py sh bzl ini yml yaml BUILD bazel --fix |
| 38 | + # this would be the better language implementation, but struggle with python tooling |
| 39 | + # language: python |
| 40 | + language: unsupported_script |
| 41 | + minimum_pre_commit_version: 3.2.0 |
| 42 | + types_or: [python, yaml, ini, rst, sh, shell, bash, bazel, c, c++, rust] |
0 commit comments