|
| 1 | +# The example configuration file for the protolint is located here: |
| 2 | +# https://github.com/yoheimuta/protolint/blob/master/_example/config/.protolint.yaml |
| 3 | +--- |
| 4 | +# Lint directives. |
| 5 | +lint: |
| 6 | + # Linter rules. |
| 7 | + # Run `protolint list` to see all available rules. |
| 8 | + rules: |
| 9 | + # Determines whether or not to include the default set of linters. |
| 10 | + no_default: true |
| 11 | + |
| 12 | + # Set the default to all linters. This option works the other way around as no_default does. |
| 13 | + # If you want to enable this option, delete the comment out below and no_default. |
| 14 | + # all_default: true. |
| 15 | + |
| 16 | + # The specific linters to add. |
| 17 | + add: |
| 18 | + - MESSAGE_NAMES_UPPER_CAMEL_CASE |
| 19 | + - MAX_LINE_LENGTH |
| 20 | + - INDENT |
| 21 | + - FILE_NAMES_LOWER_SNAKE_CASE |
| 22 | + - IMPORTS_SORTED |
| 23 | + - PACKAGE_NAME_LOWER_CASE |
| 24 | + - ORDER |
| 25 | + - SERVICES_HAVE_COMMENT |
| 26 | + - RPCS_HAVE_COMMENT |
| 27 | + - PROTO3_FIELDS_AVOID_REQUIRED |
| 28 | + - PROTO3_GROUPS_AVOID |
| 29 | + - SYNTAX_CONSISTENT |
| 30 | + - RPC_NAMES_CASE |
| 31 | + - QUOTE_CONSISTENT |
| 32 | + |
| 33 | + # Linter rules option. |
| 34 | + rules_option: |
| 35 | + # MAX_LINE_LENGTH rule option. |
| 36 | + max_line_length: |
| 37 | + # Enforces a maximum line length. |
| 38 | + max_chars: 80 |
| 39 | + # Specifies the character count for tab characters. |
| 40 | + tab_chars: 2 |
| 41 | + |
| 42 | + # INDENT rule option. |
| 43 | + indent: |
| 44 | + # Available styles are 4(4-spaces), 2(2-spaces) or tab. |
| 45 | + style: 4 |
| 46 | + # Specifies if it should stop considering and inserting new lines at the appropriate positions. |
| 47 | + # when the inner elements are on the same line. Default is false. |
| 48 | + not_insert_newline: true |
| 49 | + |
| 50 | + # QUOTE_CONSISTENT rule option. |
| 51 | + quote_consistent: |
| 52 | + # Available quote are "double" or "single". |
| 53 | + quote: double |
| 54 | + |
| 55 | + # ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH rule option. |
| 56 | + enum_field_names_zero_value_end_with: |
| 57 | + suffix: INVALID |
| 58 | + |
| 59 | + # SERVICE_NAMES_END_WITH rule option. |
| 60 | + service_names_end_with: |
| 61 | + text: Service |
| 62 | + |
| 63 | + # REPEATED_FIELD_NAMES_PLURALIZED rule option. |
| 64 | + ## The spec for each rules follows the implementation of https://github.com/gertd/go-pluralize. |
| 65 | + ## Plus, you can refer to this rule's test code. |
| 66 | + repeated_field_names_pluralized: |
| 67 | + uncountable_rules: |
| 68 | + - paper |
| 69 | + irregular_rules: |
| 70 | + Irregular: Regular |
0 commit comments