1# buildifier: disable=module-docstring 2def my_rule_impl(ctx): 3 _ignore = [ctx] # @unused 4 return [] 5 6# buildifier: disable=unsorted-dict-items 7my_rule = rule( 8 implementation = my_rule_impl, 9 doc = "This is my rule. It does stuff.", 10 attrs = { 11 "first": attr.label( 12 mandatory = True, 13 doc = "first doc string", 14 allow_single_file = True, 15 ), 16 "second": attr.string_dict(mandatory = True), 17 "third": attr.output(mandatory = True), 18 "fourth": attr.bool(default = False, doc = "fourth doc string", mandatory = False), 19 "_hidden": attr.string(), 20 }, 21) 22