This rule attempts to enforce reasonable filenames for proto files, as mandated in AIP-191.


Because proto filenames show up in client libraries (for example, as import paths), it is important not to have odd paths.

This rule currently complains if the filename:

  • …is set to the proto version.
  • …contains invalid cahracters.


Incorrect filenames for this rule:

  • v1.proto
  • v1beta1.proto
  • library.service.proto
  • library#.proto
  • library$.proto
  • library service.proto
  • library_Service.proto

Correct filenames for this rule:

  • library.proto
  • library_service.proto


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::filenames=disabled
// We need to do this because reasons. --)
syntax = "proto3";