Skip to content

package-version-suffix

Protobufstyleno fixdefault: offprotobuf/buf-standard

Reports a package whose last component is not v1, v1test..., v1alpha1, v1beta1 or v1p1alpha1 (v1beta too).

A version in the package lets an incompatible API live next to the old one under another name (api.v2) instead of breaking its users. Without it a breaking change has to be made in place.

To fix, add a version component, for example acme.orders.v1.

Reported
syntax = "proto3";
package Acme.core;
...
protobuf:
lint:
rules:
package-version-suffix: warn # off (default), warn, error

Enabled by the presets: protobuf/buf-standard.

Suppress one line with sudsy-disable-next-line package-version-suffix in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
buf PACKAGE_VERSION_SUFFIX full