EasyP

Package Same Swift Prefix

Categories:

  • MINIMAL
  • BASIC
  • DEFAULT

This rule checks that all files with a given package are in the same Swift prefix.

Examples

Bad

// File: pkg/foo.proto

syntax = "proto3";

package pkg;

option swift_prefix = "Foo";
// File: pkg/bar.proto

syntax = "proto3";

package pkg;

option swift_prefix = "Bar";

Good

// File: pkg/foo.proto

syntax = "proto3";

package pkg;

option swift_prefix = "Foo";
// File: pkg/bar.proto

syntax = "proto3";

package pkg;

option swift_prefix = "Foo";

On this page