xref: /aosp_15_r20/external/stardoc/test/testdata/multiple_files_test/input.bzl (revision b2fa42943c124aa9c7163734493fc7a7559681cf)
1"""A direct dependency file of the input file."""
2
3load(":testdata/multiple_files_test/dep.bzl", "my_rule_impl", "some_cool_function")
4
5my_rule = rule(
6    implementation = my_rule_impl,
7    doc = "This is my rule. It does stuff.",
8    attrs = {
9        "first": attr.label(
10            mandatory = True,
11            doc = "first my_rule doc string",
12            allow_single_file = True,
13        ),
14        "second": attr.string_dict(mandatory = True),
15    },
16)
17
18def top_fun(a, b, c):
19    some_cool_function(a, b, c)
20    return 6
21
22# buildifier: disable=unsorted-dict-items
23other_rule = rule(
24    implementation = my_rule_impl,
25    doc = "This is another rule.",
26    attrs = {
27        "third": attr.label(
28            mandatory = True,
29            doc = "third other_rule doc string",
30            allow_single_file = True,
31        ),
32        "fourth": attr.string_dict(mandatory = True),
33    },
34)
35
36yet_another_rule = rule(
37    implementation = my_rule_impl,
38    doc = "This is yet another rule",
39    attrs = {
40        "fifth": attr.label(mandatory = True, allow_single_file = True),
41    },
42)
43