diff --git a/.github/workflows/buildifier.yml b/.github/workflows/buildifier.yml index b5d1e2244d5c..f3fbf97854ce 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 //misc/bazel: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 62ac0d95779b..45935401beeb 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 //misc/bazel:buildifier + entry: bazel run //misc/bazel/buildifier pass_filenames: false # DISABLED: can be enabled by copying this config and installing `pre-commit` with `--config` on the copy diff --git a/misc/bazel/BUILD.bazel b/misc/bazel/BUILD.bazel index d5c157439037..c3670b75c94a 100644 --- a/misc/bazel/BUILD.bazel +++ b/misc/bazel/BUILD.bazel @@ -1,13 +1,3 @@ -load("@buildifier_prebuilt//:rules.bzl", "buildifier") - -buildifier( - name = "buildifier", - exclude_patterns = [ - "./.git/*", - ], - lint_mode = "fix", -) - sh_library( name = "sh_runfiles", srcs = ["runfiles.sh"], diff --git a/misc/bazel/buildifier/BUILD.bazel b/misc/bazel/buildifier/BUILD.bazel new file mode 100644 index 000000000000..3ccdcda5f129 --- /dev/null +++ b/misc/bazel/buildifier/BUILD.bazel @@ -0,0 +1,9 @@ +load("@buildifier_prebuilt//:rules.bzl", "buildifier") + +buildifier( + name = "buildifier", + exclude_patterns = [ + "./.git/*", + ], + lint_mode = "fix", +) diff --git a/misc/ripunzip/install.sh b/misc/ripunzip/install.sh index 2fb4d48ed6c0..d9ee6dda1cb6 100755 --- a/misc/ripunzip/install.sh +++ b/misc/ripunzip/install.sh @@ -2,7 +2,7 @@ set -eu -. misc/bazel/runfiles.sh +source misc/bazel/runfiles.sh 2>/dev/null || source external/ql~/misc/bazel/runfiles.sh dest="${2:-$HOME/.local/bin}"