blob: 61d185dd5fbb68f203f278a9592a59691a66d7e4 [file] [log] [blame]
"""Input file for markdown template test"""
# buildifier: disable=unused-variable
def example_function(foo, bar = "bar"):
"""Small example of function using a markdown template.
Args:
foo: This parameter does foo related things.
bar: This parameter does bar related things.
For example, it does things that require **multiple paragraphs** to explain.
Note: we should preserve the nested indent in the following code:
```json
{
"key": "value"
}
```
"""
pass
ExampleProviderInfo = provider(
doc = "Small example of provider using a markdown template.",
fields = {
"foo": "A string representing foo",
"bar": "A string representing bar",
"baz": "A string representing baz",
},
)
# buildifier: disable=unused-variable
def _rule_impl(ctx):
return []
example_rule = rule(
implementation = _rule_impl,
doc = "Small example of rule using a markdown template.",
attrs = {
"first": attr.string(doc = "This is the first attribute"),
"second": attr.int(default = 2),
},
)
# buildifier: disable=unused-variable
def _aspect_impl(ctx):
return []
example_aspect = aspect(
implementation = _aspect_impl,
doc = "Small example of aspect using a markdown template.",
attr_aspects = ["deps", "attr_aspect"],
attrs = {
"first": attr.string(mandatory = True),
"second": attr.string(doc = "This is the second attribute."),
},
)