Skip to content

syntax-specified

Protobufstyleno fixdefault: offprotobuf/buf-standard

Reports a file without syntax = ...; or edition = ...;, which makes it proto2.

A file without the statement is proto2 by default. New files almost always mean proto3 or an edition, and with the default they get required fields and other rules that differ.

To fix, add syntax = "proto3"; or an edition.

Reported
import public "google/protobuf/empty.proto";
message Old {
...
protobuf:
lint:
rules:
syntax-specified: warn # off (default), warn, error

Enabled by the presets: protobuf/buf-standard.

Suppress one line with sudsy-disable-next-line syntax-specified 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 SYNTAX_SPECIFIED full