Просмотр исходного кода

Fix buildifier file regex (#1254)

Previous form didn't include *.BUILD or *.bzl files by acceident -- this new form is simpler and more correct, with no issues detected.

Co-authored-by: Chandler Carruth <chandlerc@gmail.com>
Jon Meow 4 лет назад
Родитель
Сommit
451004a44e
1 измененных файлов с 6 добавлено и 1 удалено
  1. 6 1
      .pre-commit-config.yaml

+ 6 - 1
.pre-commit-config.yaml

@@ -58,7 +58,12 @@ repos:
         name: Bazel buildifier
         entry: scripts/run_buildifier.py
         language: python
-        files: '^(.*/)?(BUILD\.bazel|BUILD|WORKSPACE)$|\.BUILD$|\.bzl$'
+        files: |
+          (?x)^(
+            .*BUILD.*|
+            .*WORKSPACE.*|
+            .*\.bzl
+          )$'
       - id: clang-format
         name: clang-format
         entry: clang-format