| rule_info { |
| rule_name: "my_rule" |
| doc_string: "This is my rule. It does stuff." |
| attribute { |
| name: "name" |
| doc_string: "A unique name for this target." |
| type: NAME |
| mandatory: true |
| } |
| attribute { |
| name: "first" |
| type: LABEL |
| mandatory: true |
| } |
| attribute { |
| name: "second" |
| type: STRING_DICT |
| mandatory: true |
| } |
| } |
| rule_info { |
| rule_name: "other_rule" |
| doc_string: "This is another rule." |
| attribute { |
| name: "name" |
| doc_string: "A unique name for this target." |
| type: NAME |
| mandatory: true |
| } |
| attribute { |
| name: "fourth" |
| type: STRING_DICT |
| mandatory: true |
| } |
| attribute { |
| name: "third" |
| type: LABEL |
| mandatory: true |
| } |
| } |
| rule_info { |
| rule_name: "yet_another_rule" |
| doc_string: "This is yet another rule" |
| attribute { |
| name: "name" |
| doc_string: "A unique name for this target." |
| type: NAME |
| mandatory: true |
| } |
| attribute { |
| name: "fifth" |
| type: LABEL |
| mandatory: true |
| } |
| } |
| func_info { |
| function_name: "my_rule_impl" |
| parameter { |
| name: "ctx" |
| mandatory: true |
| } |
| } |