diff --git a/MODULE.bazel b/MODULE.bazel index 211b3ca2..7d4f4b25 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -24,8 +24,7 @@ bazel_dep(name = "aspect_rules_py", version = "1.4.0") # py_binary/py_library l bazel_dep(name = "aspect_rules_lint", version = "2.5.0") bazel_dep(name = "rules_multitool", version = "1.9.0") bazel_dep(name = "rules_java", version = "8.15.1") # required for dash - -bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2", dev_dependency = True) +bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2") ## Rules Score bazel_dep(name = "rules_cc", version = "0.2.14") diff --git a/third_party/format/README.md b/third_party/format/README.md index f17c8219..436b2891 100644 --- a/third_party/format/README.md +++ b/third_party/format/README.md @@ -59,11 +59,7 @@ opt-in so that projects without C++ code do not depend on the LLVM toolchain. Declares this module and includes required dependencies: ```python -module(name = "score_format_checker", version = "0.1.1") - -bazel_dep(name = "aspect_rules_lint", version = "1.0.3") -bazel_dep(name = "buildifier_prebuilt", version = "7.3.1") -bazel_dep(name = "score_rust_policies", version = "0.0.2") +module(name = "score_tooling", version = "2.0.2") ``` --- @@ -72,25 +68,11 @@ bazel_dep(name = "score_rust_policies", version = "0.0.2") ### 1️⃣ Declare the dependency in your project’s `MODULE.bazel`: -```python -bazel_dep(name = "score_format_checker", version = "0.1.1") - -# If using local source: -local_path_override( - module_name = "score_format_checker", - path = "../tooling/format", -) - -# Explicit dependencies required by the macro -bazel_dep(name = "aspect_rules_lint", version = "1.0.3") -bazel_dep(name = "buildifier_prebuilt", version = "7.3.1") -bazel_dep(name = "score_rust_policies", version = "0.0.2") -``` ### 2️⃣ In your project’s `BUILD.bazel`: ```python -load("@score_format_checker//:macros.bzl", "use_format_targets") +load("@score_tooling//third_party/format:macros.bzl", "use_format_targets") use_format_targets() ``` @@ -139,6 +121,7 @@ bazel run @score_tooling//third_party/format:rustfmt_with_policies ## C++ support C++ formatting is opt-in. Enable it by adding `cpp` to the `languages` list: +For this to work you have to have the llvm toolchain in your repository ```python use_format_targets(languages = ["python", "rust", "starlark", "yaml", "cpp"])