1# buildifier: disable=module-docstring 2def my_rule_impl(ctx): 3 return [] 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 doc string", 12 allow_single_file = True, 13 ), 14 "second": attr.string_dict(mandatory = True), 15 "third": attr.output(mandatory = True), 16 "fourth": attr.bool(default = False, doc = "fourth doc string", mandatory = False), 17 "_hidden": attr.string(), 18 }, 19) 20