From e42f7ce0def1248af307189378ed06f43ab1bf2b Mon Sep 17 00:00:00 2001 From: Ben Lee Date: Wed, 4 Oct 2023 22:09:32 +0000 Subject: [PATCH] Add Bzlmod docs to README (#49) --- README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 704b90a..9a1caab 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,14 @@ for [the Bazel build system](https://bazel.build). ## Usage + + +### `MODULE.bazel` Configuration + +```starlark +bazel_dep(name = "rules_pmd", version = "...") +``` + ### `WORKSPACE` Configuration Declare the rule in the `WORKSPACE` file. @@ -35,10 +43,10 @@ rules_pmd_toolchains() Once declared in the `WORSKPACE` file, the rule can be loaded in the `BUILD` file. ```starlark -load("@rules_pmd//pmd:defs.bzl", "pmd") +load("@rules_pmd//pmd:defs.bzl", "pmd_test") -pmd( - name = "pmd_analysis", +pmd_test( + name = "pmd_analysis_test", srcs = glob(["src/main/java/**/*.java"]), ) ```