protoc: version: 3.19.1 includes: - vendor/ lint: group: empty ignores: - id: FILE_OPTIONS_GO_PACKAGE_NOT_LONG_FORM files: - vendor/google/rpc/status.proto rules: # The specific linters to add. # TODO Enable more: https://github.com/talos-systems/talos/issues/2722. add: # All rules except language-specific (C#, Java, Obj-C, PHP, Ruby, but not Go). # prototool lint --list-all-linters | grep -vE '(CSHARP|JAVA|OBJC|PHP|RUBY)' - COMMENTS_NO_C_STYLE # Verifies that there are no /* c-style */ comments. - COMMENTS_NO_INLINE # Verifies that there are no inline comments. # - ENUMS_HAVE_COMMENTS # Verifies that all enums have a comment of the form "// EnumName ...". # - ENUMS_HAVE_SENTENCE_COMMENTS # Verifies that all enums have a comment that contains at least one complete sentence. # - ENUMS_NO_ALLOW_ALIAS # Verifies that no enums use the option "allow_alias". # - ENUM_FIELDS_HAVE_COMMENTS # Verifies that all enum fields have a comment of the form "// FIELD_NAME ...". # - ENUM_FIELDS_HAVE_SENTENCE_COMMENTS # Verifies that all enum fields have a comment that contains at least one complete sentence. - ENUM_FIELD_NAMES_UPPERCASE # Verifies that all enum field names are UPPERCASE. - ENUM_FIELD_NAMES_UPPER_SNAKE_CASE # Verifies that all enum field names are UPPER_SNAKE_CASE. # - ENUM_FIELD_PREFIXES # Verifies that all enum fields are prefixed with [NESTED_MESSAGE_NAME_]ENUM_NAME_. # - ENUM_FIELD_PREFIXES_EXCEPT_MESSAGE # Verifies that all enum fields are prefixed with ENUM_NAME_. - ENUM_NAMES_CAMEL_CASE # Verifies that all enum names are CamelCase. - ENUM_NAMES_CAPITALIZED # Verifies that all enum names are Capitalized. # - ENUM_ZERO_VALUES_INVALID # Verifies that all enum zero value names are [NESTED_MESSAGE_NAME_]ENUM_NAME_INVALID. # - ENUM_ZERO_VALUES_INVALID_EXCEPT_MESSAGE # Verifies that all enum zero value names are ENUM_NAME_INVALID. - FIELDS_NOT_RESERVED # Verifies that no message or enum has a reserved field. - FILE_HEADER # Verifies that the file header matches the expected file header if the file_header option is set in the configuration file. - FILE_NAMES_LOWER_SNAKE_CASE # Verifies that the file name is lower_snake_case.proto. # - FILE_OPTIONS_EQUAL_GO_PACKAGE_PB_SUFFIX # Verifies that the file option "go_package" is equal to $(basename PACKAGE)pb. # - FILE_OPTIONS_EQUAL_GO_PACKAGE_V2_SUFFIX # Verifies that the file option "go_package" is equal to the last two values of the package separated by "."s, or just the package name if there are no "."s. - FILE_OPTIONS_GO_PACKAGE_NOT_LONG_FORM # Verifies that the file option "go_package" is not of the form "go/import/path;package". - FILE_OPTIONS_GO_PACKAGE_SAME_IN_DIR # Verifies that the file option "go_package" of all files in a directory are the same. - FILE_OPTIONS_REQUIRE_GO_PACKAGE # Verifies that the file option "go_package" is set. - GOGO_NOT_IMPORTED # Verifies that the "gogo.proto" file from gogo/protobuf is not imported. - IMPORTS_NOT_PUBLIC # Verifies that there are no public imports. - IMPORTS_NOT_WEAK # Verifies that there are no weak imports. # - MESSAGES_HAVE_COMMENTS # Verifies that all non-extended messages have a comment of the form "// MessageName ...". # - MESSAGES_HAVE_COMMENTS_EXCEPT_REQUEST_RESPONSE_TYPES # Verifies that all non-extended messages except for request and response types have a comment of the form "// MessageName ...". # - MESSAGES_HAVE_SENTENCE_COMMENTS_EXCEPT_REQUEST_RESPONSE_TYPES # Verifies that all non-extended messages except for request and response types have a comment that contains at least one complete sentence. - MESSAGES_NOT_EMPTY_EXCEPT_REQUEST_RESPONSE_TYPES # Verifies that all messages except for request and response types are not empty. - MESSAGE_FIELDS_DURATION # Verifies that all non-map fields that contain "duration" in their name are google.protobuf.Durations. # - MESSAGE_FIELDS_HAVE_COMMENTS # Verifies that all message fields have a comment of the form "// field_name ...". # - MESSAGE_FIELDS_HAVE_SENTENCE_COMMENTS # Verifies that all message fields have a comment that contains at least one complete sentence. - MESSAGE_FIELDS_NOT_FLOATS # Verifies that all message fields are not floats. - MESSAGE_FIELDS_NO_JSON_NAME # Verifies that no message field has the "json_name" option set. # - MESSAGE_FIELDS_TIME # Verifies that all non-map fields that contain "time" in their name are google.protobuf.Timestamps. - MESSAGE_FIELD_NAMES_FILENAME # Verifies that all message field names do not contain "file_name" as "filename" should be used instead. - MESSAGE_FIELD_NAMES_FILEPATH # Verifies that all message field names do not contain "file_path" as "filepath" should be used instead. - MESSAGE_FIELD_NAMES_LOWERCASE # Verifies that all message field names are lowercase. - MESSAGE_FIELD_NAMES_LOWER_SNAKE_CASE # Verifies that all message field names are lower_snake_case. - MESSAGE_FIELD_NAMES_NO_DESCRIPTOR # Verifies that all message field names are not "descriptor", which results in a collision in Java-generated code. - MESSAGE_NAMES_CAMEL_CASE # Verifies that all non-extended message names are CamelCase. - MESSAGE_NAMES_CAPITALIZED # Verifies that all non-extended message names are Capitalized. # - NAMES_NO_COMMON # Verifies that no type name contains the word "common". # - NAMES_NO_DATA # Verifies that no type name contains the word "data". # - NAMES_NO_UUID # Verifies that no type name contains the word "uuid". - ONEOF_NAMES_LOWER_SNAKE_CASE # Verifies that all oneof names are lower_snake_case. - PACKAGES_SAME_IN_DIR # Verifies that the packages of all files in a directory are the same. - PACKAGE_IS_DECLARED # Verifies that there is a package declaration. - PACKAGE_LOWER_CASE # Verifies that the package name only contains characters in the range a-z0-9 and periods. - PACKAGE_LOWER_SNAKE_CASE # Verifies that the package is lower_snake.case. # - PACKAGE_MAJOR_BETA_VERSIONED # Verifies that the package is of the form "package.vMAJORVERSION" or "package.vMAJORVERSIONbetaBETAVERSION" with versions >=1. - PACKAGE_NO_KEYWORDS # Verifies that no packages contain one of the keywords "internal,public,private,protected,std" as part of the name when split on '.'. # - REQUEST_RESPONSE_NAMES_MATCH_RPC # Verifies that all request names are RpcNameRequest and all response names are RpcNameResponse. - REQUEST_RESPONSE_TYPES_AFTER_SERVICE # Verifies that request and response types are defined after any services and the response type is defined after the request type. # - REQUEST_RESPONSE_TYPES_IN_SAME_FILE # Verifies that all request and response types are in the same file as their corresponding service and are not nested messages. # - REQUEST_RESPONSE_TYPES_ONLY_IN_FILE # Verifies that only request and response types are the only types in the same file as their corresponding service. # - REQUEST_RESPONSE_TYPES_UNIQUE # Verifies that all request and response types are unique to each RPC. # - RPCS_HAVE_COMMENTS # Verifies that all rpcs have a comment of the form "// RPCName ...". # - RPCS_HAVE_SENTENCE_COMMENTS # Verifies that all rpcs have a comment that contains at least one complete sentence. # - RPCS_NO_STREAMING # Verifies that all rpcs are unary. - RPC_NAMES_CAMEL_CASE # Verifies that all RPC names are CamelCase. - RPC_NAMES_CAPITALIZED # Verifies that all RPC names are Capitalized. - RPC_OPTIONS_NO_GOOGLE_API_HTTP # Verifies that the RPC option "google.api.http" is not used. # - SERVICES_HAVE_COMMENTS # Verifies that all services have a comment of the form "// ServiceName ...". - SERVICES_HAVE_SENTENCE_COMMENTS # Verifies that all services have a comment that contains at least one complete sentence. # - SERVICE_NAMES_API_SUFFIX # Verifies that all service names end with "API". - SERVICE_NAMES_CAMEL_CASE # Verifies that all service names are CamelCase. - SERVICE_NAMES_CAPITALIZED # Verifies that all service names are Capitalized. # - SERVICE_NAMES_MATCH_FILE_NAME # Verifies that there is one service per file and the file name is service_name_lower_snake_case.proto. - SERVICE_NAMES_NO_PLURALS # Verifies that all CamelCase service names do not contain plural components. - SYNTAX_PROTO3 # Verifies that the syntax is proto3. - WKT_DIRECTLY_IMPORTED # Verifies that the Well-Known Types are directly imported using "google/protobuf/" as the base of the import. # - WKT_DURATION_SUFFIX # Verifies that all google.protobuf.Duration field names are "duration" or end in "_duration". # - WKT_TIMESTAMP_SUFFIX # Verifies that all google.protobuf.Timestamp field names are "time" or end in "_time". break: include_beta: false allow_beta_deps: false # We don't use prototool for code generation, so there are no settings for that.