mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Address review.
This commit is contained in:
2
.github/workflows/buildifier.yml
vendored
2
.github/workflows/buildifier.yml
vendored
@@ -24,5 +24,5 @@ jobs:
|
|||||||
extra_args: >
|
extra_args: >
|
||||||
buildifier --all-files 2>&1 ||
|
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
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ repos:
|
|||||||
name: Format bazel files
|
name: Format bazel files
|
||||||
files: \.(bazel|bzl)
|
files: \.(bazel|bzl)
|
||||||
language: system
|
language: system
|
||||||
entry: bazel run //misc/bazel:buildifier
|
entry: bazel run //misc/bazel/buildifier
|
||||||
pass_filenames: false
|
pass_filenames: false
|
||||||
|
|
||||||
# DISABLED: can be enabled by copying this config and installing `pre-commit` with `--config` on the copy
|
# DISABLED: can be enabled by copying this config and installing `pre-commit` with `--config` on the copy
|
||||||
|
|||||||
@@ -1,13 +1,3 @@
|
|||||||
load("@buildifier_prebuilt//:rules.bzl", "buildifier")
|
|
||||||
|
|
||||||
buildifier(
|
|
||||||
name = "buildifier",
|
|
||||||
exclude_patterns = [
|
|
||||||
"./.git/*",
|
|
||||||
],
|
|
||||||
lint_mode = "fix",
|
|
||||||
)
|
|
||||||
|
|
||||||
sh_library(
|
sh_library(
|
||||||
name = "sh_runfiles",
|
name = "sh_runfiles",
|
||||||
srcs = ["runfiles.sh"],
|
srcs = ["runfiles.sh"],
|
||||||
|
|||||||
9
misc/bazel/buildifier/BUILD.bazel
Normal file
9
misc/bazel/buildifier/BUILD.bazel
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
load("@buildifier_prebuilt//:rules.bzl", "buildifier")
|
||||||
|
|
||||||
|
buildifier(
|
||||||
|
name = "buildifier",
|
||||||
|
exclude_patterns = [
|
||||||
|
"./.git/*",
|
||||||
|
],
|
||||||
|
lint_mode = "fix",
|
||||||
|
)
|
||||||
@@ -9,5 +9,5 @@ sh_binary(
|
|||||||
srcs = ["install.sh"],
|
srcs = ["install.sh"],
|
||||||
args = ["$(rlocationpath :ripunzip)"],
|
args = ["$(rlocationpath :ripunzip)"],
|
||||||
data = [":ripunzip"],
|
data = [":ripunzip"],
|
||||||
deps = ["@bazel_tools//tools/bash/runfiles"],
|
deps = ["//misc/bazel:sh_runfiles"],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,16 +2,7 @@
|
|||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
# --- begin runfiles.bash initialization v3 ---
|
source misc/bazel/runfiles.sh 2>/dev/null || source external/ql~/misc/bazel/runfiles.sh
|
||||||
# Copy-pasted from the Bazel Bash runfiles library v3.
|
|
||||||
set -uo pipefail; set +e; f=bazel_tools/tools/bash/runfiles/runfiles.bash
|
|
||||||
source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \
|
|
||||||
source "$(grep -sm1 "^$f " "${RUNFILES_MANIFEST_FILE:-/dev/null}" | cut -f2- -d' ')" 2>/dev/null || \
|
|
||||||
source "$0.runfiles/$f" 2>/dev/null || \
|
|
||||||
source "$(grep -sm1 "^$f " "$0.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \
|
|
||||||
source "$(grep -sm1 "^$f " "$0.exe.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \
|
|
||||||
{ echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e
|
|
||||||
# --- end runfiles.bash initialization v3 ---
|
|
||||||
|
|
||||||
dest="${2:-$HOME/.local/bin}"
|
dest="${2:-$HOME/.local/bin}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user