mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-20 00:36:01 -04:00
pre-commit: Rearrange the YAML file to avoid the warning
Having a root level key that existed only to make an anchor led to a warning, instead create the anchor in the first place the key was used and then reference it later on.
This commit is contained in:
parent
935e4b4d62
commit
19b4f2452c
@ -1,29 +1,26 @@
|
|||||||
# See https://pre-commit.com for more information
|
# See https://pre-commit.com for more information
|
||||||
# See https://pre-commit.com/hooks.html for more hooks
|
# See https://pre-commit.com/hooks.html for more hooks
|
||||||
|
|
||||||
whitespace_excludes: &common_whitespace_excludes
|
|
||||||
# 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 directory named 'testdata'
|
|
||||||
# 4 - IDF monitor test data
|
|
||||||
exclude: |
|
|
||||||
(?x)^(
|
|
||||||
.+\.(md|rst|map|bin)|
|
|
||||||
.+test.*\/.*expected.*|
|
|
||||||
.+\/testdata\/.+|
|
|
||||||
.+test_idf_monitor\/tests\/.+
|
|
||||||
)$
|
|
||||||
|
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v3.3.0
|
rev: v3.3.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
<<: *common_whitespace_excludes
|
# 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 directory named 'testdata'
|
||||||
|
# 4 - IDF monitor test data
|
||||||
|
exclude: &whitespace_excludes |
|
||||||
|
(?x)^(
|
||||||
|
.+\.(md|rst|map|bin)|
|
||||||
|
.+test.*\/.*expected.*|
|
||||||
|
.+\/testdata\/.+|
|
||||||
|
.+test_idf_monitor\/tests\/.+
|
||||||
|
)$
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
<<: *common_whitespace_excludes
|
exclude: *whitespace_excludes
|
||||||
- id: check-executables-have-shebangs
|
- id: check-executables-have-shebangs
|
||||||
- id: file-contents-sorter
|
- id: file-contents-sorter
|
||||||
files: 'tools/ci/executable-list.txt'
|
files: 'tools/ci/executable-list.txt'
|
||||||
|
Loading…
Reference in New Issue
Block a user