From 92b3eda12d7605283a5616ec6b9e9a2681f221e5 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Mon, 6 May 2024 16:00:05 +0200 Subject: [PATCH] Bazel: move buildifier out of root `BUILD` See https://github.com/github/codeql/pull/16428 for details as to why this is necessary. --- .github/workflows/buildifier.yml | 2 +- .pre-commit-config.yaml | 2 +- BUILD.bazel | 9 --------- misc/bazel/BUILD.bazel | 9 +++++++++ 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/buildifier.yml b/.github/workflows/buildifier.yml index 82444d0440af..b5d1e2244d5c 100644 --- a/.github/workflows/buildifier.yml +++ b/.github/workflows/buildifier.yml @@ -24,5 +24,5 @@ jobs: extra_args: > buildifier --all-files 2>&1 || ( - echo -e "In order to format all bazel files, please run:\n bazel run //:buildifier"; exit 1 + echo -e "In order to format all bazel files, please run:\n bazel run //misc/bazel:buildifier"; exit 1 ) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7fddd1929d4f..00c34e5df06e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ repos: name: Format bazel files files: \.(bazel|bzl) language: system - entry: bazel run //:buildifier + entry: bazel run //misc/bazel:buildifier pass_filenames: false - id: codeql-format diff --git a/BUILD.bazel b/BUILD.bazel index 3ccdcda5f129..e69de29bb2d1 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,9 +0,0 @@ -load("@buildifier_prebuilt//:rules.bzl", "buildifier") - -buildifier( - name = "buildifier", - exclude_patterns = [ - "./.git/*", - ], - lint_mode = "fix", -) diff --git a/misc/bazel/BUILD.bazel b/misc/bazel/BUILD.bazel index e69de29bb2d1..3ccdcda5f129 100644 --- a/misc/bazel/BUILD.bazel +++ b/misc/bazel/BUILD.bazel @@ -0,0 +1,9 @@ +load("@buildifier_prebuilt//:rules.bzl", "buildifier") + +buildifier( + name = "buildifier", + exclude_patterns = [ + "./.git/*", + ], + lint_mode = "fix", +)