Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 6 additions & 17 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,6 @@ bazel_dep(name = "aspect_rules_py", version = "1.6.6", dev_dependency = True)
###############################################################################
bazel_dep(name = "rules_pkg", version = "1.1.0")

###############################################################################
#
# Buildifier dependency
# Provides formatting and linting of Bazel files.
#
###############################################################################
bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2")

###############################################################################
#
# Generic linting and formatting rules
Expand All @@ -71,13 +63,10 @@ bazel_dep(name = "score_tooling", version = "1.1.2")
bazel_dep(name = "score_docs_as_code", version = "4.6.1")
bazel_dep(name = "score_process", version = "2.0.1")

# Due to bazels resolution strategy, the following dependency graph is created:
# score_process@1.5.4 (selected)
# → score_docs_as_code@4.0.1 (discovered, not selected)
# → score_process@1.5.3 (discovered, not selected)
# → score_tooling@1.2.0 ← this requirement sticks, although neither
# the old docs-as-code nor the old process module is selected.
single_version_override(
module_name = "score_tooling",
version = "1.1.2",
# Provide the tools from the devcontainer to Bazel
bazel_dep(name = "score_devcontainer", version = "1.8.0", dev_dependency = True)
git_override(
module_name = "score_devcontainer",
commit = "d4d7582b183264e537bd3912514ba3a41612141f",
remote = "https://github.com/eclipse-score/devcontainer.git",
)
4 changes: 1 addition & 3 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 24 additions & 6 deletions tools/format/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,42 @@

load("@aspect_rules_lint//format:defs.bzl", "format_multirun", "format_test")

alias(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alias feels like overkill now, lets drop it.

name = "yamlfmt_binary",
actual = "@score_devcontainer//tools:yamlfmt_binary",
visibility = ["//visibility:public"],
)

alias(
name = "ruff_binary",
actual = "@score_devcontainer//tools:ruff_binary",
visibility = ["//visibility:public"],
)

alias(
name = "buildifier_binary",
actual = "@score_devcontainer//tools:buildifier_binary",
visibility = ["//visibility:public"],
)

format_multirun(
name = "format.fix",
python = "@aspect_rules_lint//format:ruff",
starlark = "@buildifier_prebuilt//:buildifier",
python = ":ruff_binary",
starlark = ":buildifier_binary",
visibility = [
"//visibility:public",
],
yaml = "@aspect_rules_lint//format:yamlfmt",
yaml = ":yamlfmt_binary",
)

format_test(
name = "format.check",
no_sandbox = True,
python = "@aspect_rules_lint//format:ruff",
starlark = "@buildifier_prebuilt//:buildifier",
python = ":ruff_binary",
starlark = ":buildifier_binary",
visibility = [
"//visibility:public",
],
workspace = "//:MODULE.bazel",
yaml = "@aspect_rules_lint//format:yamlfmt",
yaml = ":yamlfmt_binary",
)
Loading