build: convert buildifier check to bazel test

This commit is contained in:
Malte Poll 2023-01-31 13:13:54 +01:00 committed by Malte Poll
parent 311c9b2c8b
commit a722f911b7

View File

@ -1,6 +1,6 @@
load("@bazel_gazelle//:def.bzl", "gazelle") load("@bazel_gazelle//:def.bzl", "gazelle")
load("@bazeldnf//:def.bzl", "bazeldnf") load("@bazeldnf//:def.bzl", "bazeldnf")
load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier") load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier", "buildifier_test")
# gazelle:prefix github.com/edgelesssys/constellation # gazelle:prefix github.com/edgelesssys/constellation
gazelle(name = "gazelle") gazelle(name = "gazelle")
@ -17,12 +17,14 @@ gazelle(
bazeldnf(name = "bazeldnf") bazeldnf(name = "bazeldnf")
buildifier( buildifier_test(
name = "buildifier-check", name = "buildifier-check",
lint_mode = "warn", lint_mode = "warn",
lint_warnings = ["all"], lint_warnings = ["all"],
mode = "check", mode = "diff",
no_sandbox = True,
verbose = True, verbose = True,
workspace = "WORKSPACE.bazel",
) )
buildifier( buildifier(