Created
September 23, 2019 19:39
-
-
Save amazingandyyy/bcf44521ee276f76862113219cef7575 to your computer and use it in GitHub Desktop.
uber2 rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ minted_proto git:(update_minto_compile) ✗ prototool lint --list-linters | |
COMMENTS_NO_C_STYLE Verifies that there are no /* c-style */ comments. | |
COMMENTS_NO_INLINE Verifies that there are no inline comments. | |
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_FIELD_NAMES_UPPER_SNAKE_CASE Verifies that all enum field names are UPPER_SNAKE_CASE. | |
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_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_CSHARP_NAMESPACE_SAME_IN_DIR Verifies that the file option “csharp_namespace” of all files in a directory are the same. | |
FILE_OPTIONS_EQUAL_CSHARP_NAMESPACE_CAPITALIZED Verifies that the file option “csharp_namespace” is the capitalized version of the package. | |
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_EQUAL_JAVA_MULTIPLE_FILES_TRUE Verifies that the file option “java_multiple_files” is equal to true. | |
FILE_OPTIONS_EQUAL_JAVA_OUTER_CLASSNAME_PROTO_SUFFIX Verifies that the file option “java_outer_classname” is equal to $(upperCamelCase $(basename FILE))Proto. | |
FILE_OPTIONS_EQUAL_JAVA_PACKAGE_PREFIX Verifies that the file option “java_package” is equal to PREFIX.PACKAGE, with PREFIX defaulting to “com” and configurable in your configuration file. | |
FILE_OPTIONS_EQUAL_OBJC_CLASS_PREFIX_ABBR Verifies that the file option “objc_class_prefix” is the abbreviated version of the package. | |
FILE_OPTIONS_EQUAL_PHP_NAMESPACE_CAPITALIZED Verifies that the file option “php_namespace” is the capitalized version of the package. | |
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_JAVA_MULTIPLE_FILES_SAME_IN_DIR Verifies that the file option “java_multiple_files” of all files in a directory are the same. | |
FILE_OPTIONS_JAVA_PACKAGE_SAME_IN_DIR Verifies that the file option “java_package” of all files in a directory are the same. | |
FILE_OPTIONS_OBJC_CLASS_PREFIX_SAME_IN_DIR Verifies that the file option “objc_class_prefix” of all files in a directory are the same. | |
FILE_OPTIONS_PHP_NAMESPACE_SAME_IN_DIR Verifies that the file option “php_namespace” of all files in a directory are the same. | |
FILE_OPTIONS_REQUIRE_CSHARP_NAMESPACE Verifies that the file option “csharp_namespace” is set. | |
FILE_OPTIONS_REQUIRE_GO_PACKAGE Verifies that the file option “go_package” is set. | |
FILE_OPTIONS_REQUIRE_JAVA_MULTIPLE_FILES Verifies that the file option “java_multiple_files” is set. | |
FILE_OPTIONS_REQUIRE_JAVA_OUTER_CLASSNAME Verifies that the file option “java_outer_classname” is set. | |
FILE_OPTIONS_REQUIRE_JAVA_PACKAGE Verifies that the file option “java_package” is set. | |
FILE_OPTIONS_REQUIRE_OBJC_CLASS_PREFIX Verifies that the file option “objc_class_prefix” is set. | |
FILE_OPTIONS_REQUIRE_PHP_NAMESPACE Verifies that the file option “php_namespace” is set. | |
IMPORTS_NOT_PUBLIC Verifies that there are no public imports. | |
IMPORTS_NOT_WEAK Verifies that there are no weak imports. | |
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. | |
MESSAGE_FIELDS_NO_JSON_NAME Verifies that no message field has the “json_name” option set. | |
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_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_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_SENTENCE_COMMENTS Verifies that all rpcs have a comment that contains at least one complete sentence. | |
RPC_NAMES_CAMEL_CASE Verifies that all RPC names are CamelCase. | |
RPC_NAMES_CAPITALIZED Verifies that all RPC names are Capitalized. | |
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. | |
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”. | |
➜ minted_proto git:(update_minto_compile) ✗ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment