Import buildifier
This patch sets up buildifier to run as part of CI. It can also be run
manually via `//tools/lint:buildifier`.
As a consequence, I needed to make the whole repo conform.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: Ic41c97b17255813b6c21aef40ab2f8a216683a2c
diff --git a/y2020/BUILD b/y2020/BUILD
index db7069b..0a32370 100644
--- a/y2020/BUILD
+++ b/y2020/BUILD
@@ -1,6 +1,5 @@
load("//frc971:downloader.bzl", "robot_downloader")
load("//aos:config.bzl", "aos_config")
-load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library")
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
load("//tools/build_rules:template.bzl", "jinja2_template")
@@ -286,8 +285,6 @@
target_compatible_with = ["@platforms//os:linux"],
)
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
-
flatbuffer_cc_library(
name = "setpoint_fbs",
srcs = [
diff --git a/y2020/control_loops/drivetrain/BUILD b/y2020/control_loops/drivetrain/BUILD
index d666bdc..570f0c1 100644
--- a/y2020/control_loops/drivetrain/BUILD
+++ b/y2020/control_loops/drivetrain/BUILD
@@ -1,6 +1,5 @@
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_ts_library")
load("//aos:config.bzl", "aos_config")
-load("//tools/build_rules:select.bzl", "compiler_select", "cpu_select")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
genrule(
diff --git a/y2020/control_loops/superstructure/BUILD b/y2020/control_loops/superstructure/BUILD
index e5ff8dc..74ccece 100644
--- a/y2020/control_loops/superstructure/BUILD
+++ b/y2020/control_loops/superstructure/BUILD
@@ -1,8 +1,8 @@
-package(default_visibility = ["//visibility:public"])
-
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_ts_library")
load("@npm_bazel_typescript//:defs.bzl", "ts_library")
+package(default_visibility = ["//visibility:public"])
+
flatbuffer_cc_library(
name = "superstructure_goal_fbs",
srcs = [
diff --git a/y2020/control_loops/superstructure/shooter/BUILD b/y2020/control_loops/superstructure/shooter/BUILD
index d3b055c..4b0bf03 100644
--- a/y2020/control_loops/superstructure/shooter/BUILD
+++ b/y2020/control_loops/superstructure/shooter/BUILD
@@ -1,7 +1,7 @@
-package(default_visibility = ["//visibility:public"])
-
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
+package(default_visibility = ["//visibility:public"])
+
cc_library(
name = "shooter_plants",
target_compatible_with = ["@platforms//os:linux"],
diff --git a/y2020/vision/BUILD b/y2020/vision/BUILD
index bb85601..d94de5a 100644
--- a/y2020/vision/BUILD
+++ b/y2020/vision/BUILD
@@ -1,5 +1,4 @@
load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_ts_library")
-load("//aos:config.bzl", "aos_config")
flatbuffer_cc_library(
name = "vision_fbs",
diff --git a/y2020/vision/tools/python_code/BUILD b/y2020/vision/tools/python_code/BUILD
index 7579a75..b495658 100644
--- a/y2020/vision/tools/python_code/BUILD
+++ b/y2020/vision/tools/python_code/BUILD
@@ -1,6 +1,3 @@
-load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_py_library")
-load("//tools:platforms.bzl", "platforms")
-
py_library(
name = "train_and_match",
srcs = ["train_and_match.py"],