Merge pull request #16 from rickeylev:fix-buildifier-errors
PiperOrigin-RevId: 513744710
diff --git a/lib/truth.bzl b/lib/truth.bzl
index c6f6ef7..2af336f 100644
--- a/lib/truth.bzl
+++ b/lib/truth.bzl
@@ -143,8 +143,9 @@
A struct representing an `Expect` object.
"""
- # buildifier: disable=uninitialized
meta = meta or _expect_meta_new(env)
+
+ # buildifier: disable=uninitialized
public = struct(
# keep sorted start
meta = meta,
diff --git a/lib/util.bzl b/lib/util.bzl
index 0320581..10ad201 100644
--- a/lib/util.bzl
+++ b/lib/util.bzl
@@ -222,6 +222,7 @@
)
def _skip_test_impl(ctx):
+ _ = ctx # @unused
fail("Should have been skipped")
_skip_test = rule(
diff --git a/tests/truth_tests.bzl b/tests/truth_tests.bzl
index 2190d6e..aa31d0a 100644
--- a/tests/truth_tests.bzl
+++ b/tests/truth_tests.bzl
@@ -17,23 +17,9 @@
load("@bazel_skylib//lib:unittest.bzl", ut_asserts = "asserts")
load("//lib:truth.bzl", "matching", "subjects", "truth")
load("//lib:analysis_test.bzl", "analysis_test", "test_suite")
-load("//lib:util.bzl", "util")
_suite = []
-_TEST_FILES_ATTR = {
- "test_files": attr.label(
- default = ":truth_tests_data_files",
- allow_files = True,
- ),
-}
-_HELPER_ATTR = {
- "_helper": attr.label(
- default = ":truth_tests_helper",
- aspects = [util.testing_aspect],
- ),
-}
-
def _fake_env(env):
failures = []
env1 = struct(
@@ -1305,20 +1291,6 @@
)
fake_env.reset()
-def _fake_action(outputs = depset()):
- return struct(
- mnemonic = "FakeAction",
- outputs = outputs,
- argv = None,
- )
-
-def _fake_ctx(attrs = struct()):
- return struct(
- label = Label("//fake/tests:fake_test"),
- workspace_name = "fake_workspace",
- attr = attrs,
- )
-
def _test_helper_impl(ctx):
action_output = ctx.actions.declare_file("action.txt")
ctx.actions.run(