| rule_info { |
| rule_name: "example_rule" |
| doc_string: "The description of a basic rule" |
| attribute { |
| name: "name" |
| doc_string: "A unique name for this target." |
| type: NAME |
| mandatory: true |
| } |
| attribute { |
| name: "deps" |
| doc_string: "the dependencies." |
| type: LABEL_LIST |
| default_value: "[]" |
| } |
| attribute { |
| name: "src" |
| doc_string: "A source file" |
| type: LABEL |
| mandatory: true |
| } |
| attribute { |
| name: "count" |
| type: INT |
| default_value: "0" |
| } |
| attribute { |
| name: "mapping" |
| type: STRING_DICT |
| default_value: "{}" |
| } |
| origin_key { |
| name: "example_rule" |
| file: "//tools/bazel-docgen/testdata/foo:foo_internal.bzl" |
| } |
| } |
| provider_info { |
| provider_name: "FooInfo" |
| doc_string: "Some provider" |
| field_info { |
| name: "contents" |
| doc_string: "Some contents" |
| } |
| origin_key { |
| name: "FooInfo" |
| file: "//tools/bazel-docgen/testdata:foo.bzl" |
| } |
| } |
| func_info { |
| function_name: "some_function" |
| parameter { |
| name: "name" |
| doc_string: "the name to pass" |
| mandatory: true |
| } |
| parameter { |
| name: "some_val" |
| doc_string: "some value to supply" |
| default_value: "\"some_default\"" |
| } |
| parameter { |
| name: "some_int" |
| doc_string: "some integer value" |
| default_value: "1" |
| } |
| doc_string: "a starlark function" |
| return { |
| doc_string: "The number 1" |
| } |
| origin_key { |
| name: "some_function" |
| file: "//tools/bazel-docgen/testdata:foo.bzl" |
| } |
| } |
| func_info { |
| function_name: "empty_function" |
| doc_string: "empty function" |
| origin_key { |
| name: "empty_function" |
| file: "//tools/bazel-docgen/testdata:foo.bzl" |
| } |
| } |
| module_docstring: "Public definitions for the foo library" |
| file: "//tools/bazel-docgen/testdata:foo.bzl" |
| repository_rule_info { |
| rule_name: "empty_repo" |
| doc_string: "Just an empty repository rule" |
| attribute { |
| name: "name" |
| doc_string: "A unique name for this repository." |
| type: NAME |
| mandatory: true |
| } |
| attribute { |
| name: "repo_mapping" |
| doc_string: "In `WORKSPACE` context only: a dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.\n\nFor example, an entry `\"@foo\": \"@bar\"` declares that, for any time this repository depends on `@foo` (such as a dependency on `@foo//some:target`, it should actually resolve that dependency within globally-declared `@bar` (`@bar//some:target`).\n\nThis attribute is _not_ supported in `MODULE.bazel` context (when invoking a repository rule inside a module extension\'s implementation function)." |
| type: STRING_DICT |
| } |
| environ: "FOO_ENV_VAR" |
| origin_key { |
| name: "empty_repo" |
| file: "//tools/bazel-docgen/testdata/foo:foo_internal.bzl" |
| } |
| } |