1"""Input file for markdown template test""" 2 3def example_function(foo, bar = "bar"): 4 """Small example of function using a markdown template. 5 6 Args: 7 foo: This parameter does foo related things. 8 bar: This parameter does bar related things. 9 """ 10 _ignore = [foo, bar] # @unused 11 pass 12 13# buildifier: disable=unsorted-dict-items 14ExampleProviderInfo = provider( 15 doc = "Small example of provider using a markdown template.", 16 fields = { 17 "foo": "A string representing foo", 18 "bar": "A string representing bar", 19 "baz": "A string representing baz", 20 }, 21) 22 23def _rule_impl(ctx): 24 _ignore = [ctx] # @unused 25 return [] 26 27example_rule = rule( 28 implementation = _rule_impl, 29 doc = "Small example of rule using a markdown template.", 30 attrs = { 31 "first": attr.string(doc = "This is the first attribute"), 32 "second": attr.string(default = "2"), 33 }, 34) 35 36def _aspect_impl(ctx): 37 _ignore = [ctx] # @unused 38 return [] 39 40example_aspect = aspect( 41 implementation = _aspect_impl, 42 doc = "Small example of aspect using a markdown template.", 43 attr_aspects = ["deps", "attr_aspect"], 44 attrs = { 45 "first": attr.label(mandatory = True, allow_single_file = True), 46 "second": attr.string(doc = "This is the second attribute."), 47 }, 48) 49