Reference
stubs.policy.yaml
stubs.policy.yaml holds a registry policy's rules: a versioned set of lint and breaking-change rules that an owner
pushes to Stubs, and that organisations' and modules' policies can name (see Governance).
stubs policy push pushes it as a new commit of the policy; stubs policy export writes one from a commit.
version: v2
name: stubs.dev/acme/style
lint:
use: [standard]
enum_zero_value_suffix: _NONE
breaking:
use: [wire-json]It's Buf's buf.policy.yaml format, so a buf.policy.yaml can be renamed and pushed as it is, and the same rules
pushed with stubs or with buf make the same commit.
version
The format: v2. Required.
name
The registry policy it's pushed to: the registry's host, an owner and the policy's name, as in stubs.dev/acme/style.
stubs policy create makes it, or stubs policy push --create does when it doesn't exist.
lint
The lint rules: use, except, enum_zero_value_suffix, service_suffix, rpc_allow_same_request_response,
rpc_allow_google_protobuf_empty_requests, rpc_allow_google_protobuf_empty_responses and disable_builtin, as in
lint in stubs.yaml. Which files are ignored is up to each policy that names it.
breaking
The breaking-change rules: use, except, ignore_unstable_packages and disable_builtin, as in
breaking in stubs.yaml.
plugins
Check plugins on the registry the policy runs: each a plugin's name (host, owner and plugin, at a label or commit after
a colon), with its options.