Skip to content
Merged
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
38 changes: 0 additions & 38 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ bazel_dep(name = "aspect_rules_lint", version = "1.5.3")
bazel_dep(name = "rules_shell", version = "0.5.0")
bazel_dep(name = "rules_java", version = "8.15.1")
bazel_dep(name = "rules_rust", version = "0.68.1-score")
bazel_dep(name = "rules_multitool", version = "1.9.0")
bazel_dep(name = "score_rust_policies", version = "0.0.2")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2")
Expand Down Expand Up @@ -234,43 +233,6 @@ use_repo(pip, "pip_lobster_bazel")

use_repo(pip, "pip_rules_score")

###############################################################################
# Multitool Hub (for ruff, pyright, actionlint, etc.)
###############################################################################
multitool = use_extension("@rules_multitool//multitool:extension.bzl", "multitool")

#python_basics
multitool.hub(lockfile = "python_basics/multitool.lock.json")
use_repo(multitool, "multitool")

# Ruff Hub
multitool.hub(
hub_name = "ruff_hub",
lockfile = "tools/ruff.lock.json",
)
use_repo(multitool, "ruff_hub")

# Actionlint Hub
multitool.hub(
hub_name = "actionlint_hub",
lockfile = "tools/actionlint.lock.json",
)
use_repo(multitool, "actionlint_hub")

# Shellcheck Hub
multitool.hub(
hub_name = "shellcheck_hub",
lockfile = "tools/shellcheck.lock.json",
)
use_repo(multitool, "shellcheck_hub")

# YAMLfmt Hub
multitool.hub(
hub_name = "yamlfmt_hub",
lockfile = "tools/yamlfmt.lock.json",
)
use_repo(multitool, "yamlfmt_hub")

###############################################################################
# lcov deb package (provides genhtml + lcov for combined coverage reports)
###############################################################################
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ See the individual README files for detailed usage instructions and configuratio
| **format_checker** | Code formatting validation | [README](format_checker/README.md) |
| **python_basics** | Python development utilities and testing | [README](python_basics/README.md) |
| **starpls** | Starlark language server support | [README](starpls/README.md) |
| **tools** | Formatters & Linters | [README](tools/README.md) |
| **coverage** | Rust + Python coverage reports | [README](coverage/README.md) |

## Coverage
Expand Down
6 changes: 4 additions & 2 deletions bazel/rules/rules_score/test/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
load("@aspect_rules_py//py:defs.bzl", "py_binary")

# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
Expand All @@ -12,6 +10,9 @@ load("@aspect_rules_py//py:defs.bzl", "py_binary")
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************

load("@aspect_rules_py//py:defs.bzl", "py_binary")
load("@pip_tooling_test//:requirements.bzl", "requirement")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
load(
"@score_tooling//bazel/rules/rules_score:rules_score.bzl",
Expand Down Expand Up @@ -115,6 +116,7 @@ py_binary(
"@score_docs_as_code//src/extensions/score_sphinx_bundle",
"@score_tooling//bazel/rules/rules_score:bazel_sphinx_needs",
"@score_tooling//bazel/rules/rules_score:sphinx_module_ext",
requirement("sphinx-rtd-theme"),
],
)

Expand Down
2 changes: 1 addition & 1 deletion bazel/rules/rules_score/test/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pip.parse(
)
use_repo(pip, "pip_tooling_test")

bazel_dep(name = "score_docs_as_code", version = "3.0.1", dev_dependency = True)
bazel_dep(name = "score_docs_as_code", version = "4.6.1", dev_dependency = True)

bazel_dep(name = "googletest", version = "1.17.0.bcr.2")
# bazel_dep(name = "score_platform", version = "0.5.0")
Expand Down
1 change: 0 additions & 1 deletion bazel/rules/rules_score/test/template/conf.template.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"score_plantuml",
"score_metamodel",
"score_draw_uml_funcs",
"score_source_code_linker",
"score_layout",
]

Expand Down
8 changes: 3 additions & 5 deletions format_checker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@ The `languages` parameter selects which formatters are wired up. Supported value

| Language | Formatter |
| ---------- | ------------------------------------------------------ |
| `python` | `@aspect_rules_lint//format:ruff` |
| `rust` | `@score_tooling//format_checker:rustfmt_with_policies` |
| `starlark` | `@buildifier_prebuilt//:buildifier` |
| `yaml` | `@aspect_rules_lint//format:yamlfmt` |
| `cpp` | `@llvm_toolchain//:clang-format` |

When `languages` is omitted, every language except `cpp` is enabled. C++ is
Expand Down Expand Up @@ -103,8 +101,8 @@ This will register two Bazel targets:
To control which formatters run, pass an explicit `languages` list:

```python
# Only check Python and Starlark.
use_format_targets(languages = ["python", "starlark"])
# Only check Starlark.
use_format_targets(languages = ["starlark"])
```

### 3️⃣ In VS Code settings:
Expand Down Expand Up @@ -141,7 +139,7 @@ bazel run @score_tooling//format_checker:rustfmt_with_policies
C++ formatting is opt-in. Enable it by adding `cpp` to the `languages` list:

```python
use_format_targets(languages = ["python", "rust", "starlark", "yaml", "cpp"])
use_format_targets(languages = ["rust", "starlark", "cpp"])
```

- Formatter label: `@llvm_toolchain//:clang-format`, which requires the LLVM
Expand Down
4 changes: 1 addition & 3 deletions format_checker/macros.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,14 @@ load("@aspect_rules_lint//format:defs.bzl", "format_multirun", "format_test")
# Maps a user-facing language name to the (attribute, formatter label) pair that
# is forwarded to aspect_rules_lint's format_multirun / format_test rules.
_FORMATTERS = {
"python": ("python", "@aspect_rules_lint//format:ruff"),
"rust": ("rust", "@score_tooling//format_checker:rustfmt_with_policies"),
"starlark": ("starlark", "@buildifier_prebuilt//:buildifier"),
"yaml": ("yaml", "@aspect_rules_lint//format:yamlfmt"),
"cpp": ("cc", "@llvm_toolchain//:clang-format"),
}

# Languages enabled when the caller does not specify a selection. C++ is left
# out so that projects without C++ code do not depend on the LLVM toolchain.
_DEFAULT_LANGUAGES = ["python", "rust", "starlark", "yaml"]
_DEFAULT_LANGUAGES = ["rust", "starlark"]

def use_format_targets(fix_name = "format.fix", check_name = "format.check", languages = None):
"""Registers format.fix and format.check targets for the selected languages.
Expand Down
15 changes: 0 additions & 15 deletions python_basics/multitool.lock.json

This file was deleted.

27 changes: 0 additions & 27 deletions python_basics/private/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
load("@aspect_rules_lint//format:defs.bzl", "format_multirun", "format_test")
load("@bazel_skylib//rules:build_test.bzl", "build_test")
load("@pip_tooling//:requirements.bzl", "all_requirements", "requirement")
load("@rules_python//python:pip.bzl", "compile_pip_requirements")
Expand All @@ -22,31 +21,6 @@ load("@score_tooling//python_basics:defs.bzl", "score_virtualenv")
# Generate the virtualenv
score_virtualenv()

python_tool = "@aspect_rules_lint//format:ruff"

format_multirun(
name = "format.fix",
print_command = True,
python = python_tool,
visibility = [
"//visibility:private",
],
)

# Ensure all files are formatted correctly
format_test(
name = "format.check",

# Scan the entire workspace.
# This mode causes the test to be non-hermetic and it cannot be cached.
no_sandbox = True,
python = python_tool,
visibility = [
"//visibility:private",
],
workspace = "//:MODULE.bazel",
)

# In order to update the requirements, change the `requirements.txt` file and run:
# `bazel run //:requirements_3_XX.update --@@rules_python+//python/config_settings:python_version=3.XX`.
# This will update the `requirements_lock.txt` file.
Expand All @@ -71,7 +45,6 @@ format_test(
build_test(
name = "ensure_all_private_targets_work",
targets = [
":format.fix", # Ensure format.fix is executable
":requirements.update",
],
)
47 changes: 0 additions & 47 deletions tools/BUILD

This file was deleted.

46 changes: 0 additions & 46 deletions tools/README.md

This file was deleted.

25 changes: 0 additions & 25 deletions tools/actionlint.lock.json

This file was deleted.

25 changes: 0 additions & 25 deletions tools/ruff.lock.json

This file was deleted.

36 changes: 0 additions & 36 deletions tools/sample.sh

This file was deleted.

Loading
Loading