xref: /aosp_15_r20/external/stardoc/test/testdata/aspect_test/input.bzl (revision b2fa42943c124aa9c7163734493fc7a7559681cf)
1"""The input file for the aspect test"""
2
3def my_aspect_impl(ctx):
4    _ignore = [ctx]  # @unused
5    return []
6
7my_aspect = aspect(
8    implementation = my_aspect_impl,
9    doc = "This is my aspect. It does stuff.",
10    attr_aspects = ["deps", "attr_aspect"],
11    attrs = {
12        "first": attr.label(mandatory = True, allow_single_file = True),
13        "second": attr.string_dict(mandatory = True),
14    },
15)
16
17# buildifier: disable=unsorted-dict-items
18other_aspect = aspect(
19    implementation = my_aspect_impl,
20    doc = "This is another aspect.",
21    attr_aspects = ["*"],
22    attrs = {
23        "_hidden": attr.string(),
24        "third": attr.int(mandatory = True),
25    },
26)
27