Proto3 syntax

This rule enforces that every proto file for a public API surface uses proto3, as mandated in AIP-191.


This rule looks at each proto file, and complains if the syntax is set to proto2 (or missing, which means it defaults to proto2).


Incorrect code for this rule:

// Incorrect.
syntax = "proto2";  // Should be proto3.

Correct code for this rule:

// Correct.
syntax = "proto3";


If you need to violate this rule, use a comment at the top of the file. Remember to also include an comment explaining why.

// (-- api-linter: core::0191::proto-version=disabled
// We need to do this because reasons. --)
syntax = "proto2";