Reference
buf.policy.yaml
A policy file holds lint and breaking-change settings that several workspaces share. A workspace lists it under
policies in stubs.yaml, and stubs lint and stubs breaking check against it as
well as against the workspace's own settings.
version: v2
lint:
use:
- STANDARD
enum_zero_value_suffix: _NONE
breaking:
use:
- WIRE_JSONStubs doesn't host policy files yet: keep them alongside your workspaces. Organisations can set lint and breaking-change policies on the registry itself, which every push is checked against (see Governance).
version
The format: v2. Required.
name
The policy's name on a registry, as stubs.dev/acme/style, for when it's hosted there.
lint
The lint settings: the same keys as lint in stubs.yaml, except ignore,
ignore_only and disallow_comment_ignores, which each workspace sets for itself. Without it, the STANDARD rules.
breaking
The breaking-change settings: the same keys as breaking in stubs.yaml, except
ignore and ignore_only. Without it, the FILE rules.
plugins
Check plugins whose rules the policy uses, as in plugins in stubs.yaml.