• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"""Input file for proto format test"""
2
3def check_function(foo):
4    """Runs some checks on the given function parameter.
5
6    This rule runs checks on a given function parameter.
7    Use `bazel build` to run the check.
8
9    Args:
10        foo: A unique name for this rule.
11    """
12    _ignore = foo  # @unused
13    pass
14
15# buildifier: disable=unsorted-dict-items
16example = provider(
17    doc = "Stores information about an example.",
18    fields = {
19        "foo": "A string representing foo",
20        "bar": "A string representing bar",
21        "baz": "A string representing baz",
22    },
23)
24
25def _rule_impl(ctx):
26    _ignore = [ctx]  # @unused
27    return []
28
29my_example = rule(
30    implementation = _rule_impl,
31    doc = "Small example of rule.",
32    attrs = {
33        "useless": attr.string(
34            doc = "This argument will be ignored.",
35            default = "ignoreme",
36        ),
37    },
38)
39