71 lines
2.4 KiB
YAML
71 lines
2.4 KiB
YAML
---
|
|
minimum_pre_commit_version: 3.3.0
|
|
default_install_hook_types: [pre-commit,commit-msg]
|
|
|
|
repos:
|
|
- repo: https://github.com/espressif/check-copyright/
|
|
rev: v1.0.3
|
|
hooks:
|
|
- id: check-copyright
|
|
args: ['--config', 'tools/ci/check_copyright_config.yaml', '--ignore', 'tools/ci/check_copyright_ignore.txt']
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.6.0
|
|
hooks:
|
|
- id: file-contents-sorter
|
|
files: 'tools\/ci\/(executable-list\.txt|check_copyright_ignore\.txt)'
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.6.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
# note: whitespace exclusions use multiline regex, see https://pre-commit.com/#regular-expressions
|
|
# items are:
|
|
# 1 - some file extensions
|
|
# 2 - any file matching *test*/*expected* (for host tests, if possible use this naming pattern always)
|
|
# 3 - any file with known-warnings in the name
|
|
# 4 - any directory named 'testdata'
|
|
# 5 - protobuf auto-generated files
|
|
exclude: &whitespace_excludes |
|
|
(?x)^(
|
|
.+\.(md|rst|map|bin)|
|
|
.+test.*\/.*expected.*|
|
|
.+known-warnings.*|
|
|
.+\/testdata\/.+|
|
|
.*_pb2.py|
|
|
.*.pb-c.h|
|
|
.*.pb-c.c|
|
|
.*.yuv
|
|
)$
|
|
- id: end-of-file-fixer
|
|
exclude: *whitespace_excludes
|
|
- id: check-executables-have-shebangs
|
|
- id: check-shebang-scripts-are-executable
|
|
- id: mixed-line-ending
|
|
args: ['-f=lf']
|
|
- id: double-quote-string-fixer
|
|
- id: no-commit-to-branch
|
|
name: Do not use more than one slash in the branch name
|
|
args: ['--pattern', '^[^/]*/[^/]*/']
|
|
- id: no-commit-to-branch
|
|
name: Do not use uppercase letters in the branch name
|
|
args: ['--pattern', '^[^A-Z]*[A-Z]']
|
|
- repo: https://github.com/espressif/astyle_py.git
|
|
rev: v1.0.5
|
|
hooks:
|
|
- id: astyle_py
|
|
# If you are modifying astyle version, update tools/format.sh as well
|
|
args: ['--astyle-version=3.4.7', '--rules=tools/ci/astyle-rules.yml']
|
|
|
|
- repo: https://github.com/espressif/conventional-precommit-linter
|
|
rev: v1.8.0
|
|
hooks:
|
|
- id: conventional-precommit-linter
|
|
stages: [commit-msg]
|
|
|
|
- repo: https://github.com/codespell-project/codespell
|
|
rev: v2.3.0
|
|
hooks:
|
|
- id: codespell
|
|
args: [-w, "--ignore-words=codespell-ignore-list"]
|