Skip to content

Commit

Permalink
Move location of formatters to env variable in BUILD file
Browse files Browse the repository at this point in the history
Signed-off-by: Sara Adams <sara.e.adams@gmail.com>
  • Loading branch information
saraadams committed Dec 4, 2023
1 parent b0abe29 commit 643a254
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions infra/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ sh_binary(
"//third_party/buildifier",
"//third_party/google-java-format",
],
env = {
"JAVA_FORMATTER": "$(rlocationpath //third_party/google-java-format)",
"STARLARK_FORMATTER": "$(rlocationpath //third_party/buildifier)",
},
deps = ["@bazel_tools//tools/bash/runfiles"],
)
4 changes: 2 additions & 2 deletions infra/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ Examples:
EOT
}

JAVA_FORMATTER="$(rlocation com_engflow_bazel_invocation_analyzer/third_party/google-java-format/google-java-format)"
STARLARK_FORMATTER="$(rlocation com_engflow_bazel_invocation_analyzer/third_party/buildifier/buildifier)"
JAVA_FORMATTER="$(rlocation "${JAVA_FORMATTER}")"
STARLARK_FORMATTER="$(rlocation "${STARLARK_FORMATTER}")"
POSITIONAL_ARGS=()
FIX=

Expand Down

0 comments on commit 643a254

Please sign in to comment.