Skip to content

Commit cba2d1a

Browse files
committed
Add buildifier
1 parent e717bef commit cba2d1a

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed

BUILD.bazel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ load("@//rules:proto_gazelle.bzl", "proto_gazelle")
22
load("@bazel_gazelle//:def.bzl", "gazelle_binary")
33
load("@npm_ts_proto//:defs.bzl", "npm_link_all_packages")
44

5-
exports_files(["rules_proto_config.yaml"])
5+
exports_files([
6+
"rules_proto_config.yaml",
7+
"MODULE.bazel",
8+
])
69

710
# ----------------------------------------------------
811
# Gazelle

MODULE.bazel

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ bazel_dep(name = "aspect_rules_js", version = "2.5.0")
3232
bazel_dep(name = "aspect_bazel_lib", version = "2.21.1")
3333
bazel_dep(name = "abseil-cpp", version = "20250814.0")
3434

35+
# -------------------------------------------------------------------
36+
# Dev Dependencies
37+
# -------------------------------------------------------------------
38+
39+
bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2", dev_dependency = True)
40+
3541
# -------------------------------------------------------------------
3642
# Http Archives
3743
# -------------------------------------------------------------------

rules/private/proto_repository_tools_srcs.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ PROTO_REPOSITORY_TOOLS_SRCS = [
190190
"@build_stack_rules_proto//rules/ts:BUILD.bazel",
191191
"@build_stack_rules_proto//toolchain:BUILD.bazel",
192192
"@build_stack_rules_proto//toolchain/scala:BUILD.bazel",
193+
"@build_stack_rules_proto//tools:BUILD.bazel",
193194
"@build_stack_rules_proto//vendor/github.com/bazelbuild/bazel-gazelle/config:config.go",
194195
"@build_stack_rules_proto//vendor/github.com/bazelbuild/bazel-gazelle/config:constants.go",
195196
"@build_stack_rules_proto//vendor/github.com/bazelbuild/bazel-gazelle/flag:flag.go",

tools/BUILD.bazel

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
load("@buildifier_prebuilt//:rules.bzl", "buildifier", "buildifier_test")
2+
3+
# gazelle:exclude_from_release
4+
5+
buildifier(
6+
name = "buildifier.fix",
7+
diff_command = "diff",
8+
lint_mode = "fix",
9+
mode = "fix",
10+
)
11+
12+
buildifier_test(
13+
name = "buildifier.check",
14+
size = "small",
15+
diff_command = "diff",
16+
exclude_patterns = [
17+
"./vendor/*",
18+
],
19+
lint_mode = "warn",
20+
mode = "diff",
21+
no_sandbox = True,
22+
tags = ["no-remote-exec"],
23+
workspace = "//:MODULE.bazel",
24+
)

0 commit comments

Comments
 (0)