Filenames

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

Details

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.

Examples

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

Disabling

If you need to violate this rule, use a comment at the top of the file. Remember to also include an aip.dev/not-precedent comment explaining why.

// (-- api-linter: core::0191::filenames=disabled
//     aip.dev/not-precedent: We need to do this because reasons. --)
syntax = "proto3";