xref: /aosp_15_r20/external/stardoc/test/testdata/multiple_rules_test/input.bzl (revision b2fa42943c124aa9c7163734493fc7a7559681cf)
1# buildifier: disable=module-docstring
2def my_rule_impl(ctx):
3    _ignore = [ctx]  # @unused
4    return []
5
6my_rule = rule(
7    implementation = my_rule_impl,
8    doc = "This is my rule. It does stuff.",
9    attrs = {
10        "first": attr.label(mandatory = True, allow_single_file = True),
11        "second": attr.string_dict(mandatory = True),
12    },
13)
14
15# buildifier: disable=unsorted-dict-items
16other_rule = rule(
17    implementation = my_rule_impl,
18    doc = "This is another rule.",
19    attrs = {
20        "third": attr.label(mandatory = True, allow_single_file = True),
21        "_hidden": attr.string(),
22        "fourth": attr.string_dict(mandatory = True),
23    },
24)
25
26# buildifier: disable=unsorted-dict-items
27yet_another_rule = rule(
28    implementation = my_rule_impl,
29    doc = "This is yet another rule",
30    attrs = {
31        "_hidden": attr.string(),
32        "fifth": attr.label(mandatory = True, allow_single_file = True),
33    },
34)
35