diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index b2b146626234..2b57f0acf90a 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -16,3 +16,5 @@ jobs: - uses: actions/checkout@v1 - uses: actions/setup-python@v1 - uses: pre-commit/action@v2.0.0 + env: + SKIP: bazel-buildifier,clang-format-whole-file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0346947a18e3..976fb24bc709 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,6 +57,12 @@ repos: rev: 20.8b1 hooks: - id: black + - repo: https://github.com/jlebar/pre-commit-hooks.git + rev: HEAD + hooks: + - id: bazel-buildifier + - id: clang-format-whole-file + types: [c++] - repo: https://github.com/prettier/pre-commit rev: v2.1.2 hooks: diff --git a/parser/BUILD b/parser/BUILD index 6192dd8ccb3d..8a8b1e21407c 100644 --- a/parser/BUILD +++ b/parser/BUILD @@ -36,10 +36,10 @@ cc_library( hdrs = ["parse_tree.h"], deps = [ ":parse_node_kind", - "@llvm-project//llvm:Support", "//diagnostics:diagnostic_emitter", "//lexer:token_kind", "//lexer:tokenized_buffer", + "@llvm-project//llvm:Support", ], ) @@ -50,9 +50,9 @@ cc_library( deps = [ ":parse_node_kind", ":parse_tree", + "//lexer:tokenized_buffer", "@llvm-project//llvm:Support", "@llvm-project//llvm:gmock", - "//lexer:tokenized_buffer", ], ) @@ -63,13 +63,13 @@ cc_test( ":parse_node_kind", ":parse_test_helpers", ":parse_tree", + "//diagnostics:diagnostic_emitter", + "//lexer:tokenized_buffer", + "//lexer:tokenized_buffer_test_helpers", "@llvm-project//llvm:Support", "@llvm-project//llvm:gmock", "@llvm-project//llvm:gtest", "@llvm-project//llvm:gtest_main", - "//diagnostics:diagnostic_emitter", - "//lexer:tokenized_buffer", - "//lexer:tokenized_buffer_test_helpers", ], ) @@ -79,8 +79,8 @@ cc_fuzz_test( corpus = glob(["fuzzer_corpus/*"]), deps = [ ":parse_tree", - "@llvm-project//llvm:Support", "//diagnostics:diagnostic_emitter", "//lexer:tokenized_buffer", + "@llvm-project//llvm:Support", ], ) diff --git a/proposals/BUILD b/proposals/BUILD index 751f176e7ca3..b00482fedeec 100644 --- a/proposals/BUILD +++ b/proposals/BUILD @@ -5,5 +5,8 @@ filegroup( name = "website_content", srcs = glob(["*.md"]), - visibility = ["//proposals/scripts:__pkg__", "//website/jekyll:__pkg__"], + visibility = [ + "//proposals/scripts:__pkg__", + "//website/jekyll:__pkg__", + ], )