From 8fda8308ff94e7357e7011e3e323781138a5b141 Mon Sep 17 00:00:00 2001 From: Nyakku Shigure Date: Mon, 19 Sep 2022 11:36:47 +0800 Subject: [PATCH] [CodeStyle] trailing whitespace hook for .hook and .yaml (#46081) * adjust pre-commit config * incremental trailing whitespace * revert python increment, fix in #46080 * add .yaml and .hook suffix to pre-commit config, test=document_fix * add yml suffix --- .pre-commit-config.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 50a630686ab..768f0222f55 100755 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,7 @@ +exclude: | + (?x)^( + patches/.+ + )$ repos: - repo: https://github.com/Lucas-C/pre-commit-hooks.git rev: v1.1.14 @@ -26,7 +30,7 @@ repos: - id: sort-simple-yaml files: (op|backward|op_[a-z_]+)\.yaml$ - id: trailing-whitespace - files: (.*\.(py|bzl|md|rst|c|cc|cxx|cpp|cu|h|hpp|hxx|xpu|kps|cmake)|BUILD|.*\.BUILD|WORKSPACE|CMakeLists.txt)$ + files: (.*\.(py|bzl|md|rst|c|cc|cxx|cpp|cu|h|hpp|hxx|xpu|kps|cmake|yaml|yml|hook)|BUILD|.*\.BUILD|WORKSPACE|CMakeLists\.txt)$ - repo: local hooks: - id: clang-format -- GitLab