.protolint.yaml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. # Set the default to all linters. This option works the other way around as no_default does.
  12. # If you want to enable this option, delete the comment out below and no_default.
  13. # all_default: true.
  14. # The specific linters to add.
  15. add:
  16. - MESSAGE_NAMES_UPPER_CAMEL_CASE
  17. - MAX_LINE_LENGTH
  18. - INDENT
  19. - FILE_NAMES_LOWER_SNAKE_CASE
  20. - IMPORTS_SORTED
  21. - PACKAGE_NAME_LOWER_CASE
  22. - ORDER
  23. - SERVICES_HAVE_COMMENT
  24. - RPCS_HAVE_COMMENT
  25. - PROTO3_FIELDS_AVOID_REQUIRED
  26. - PROTO3_GROUPS_AVOID
  27. - SYNTAX_CONSISTENT
  28. - RPC_NAMES_CASE
  29. - QUOTE_CONSISTENT
  30. # Linter rules option.
  31. rules_option:
  32. # MAX_LINE_LENGTH rule option.
  33. max_line_length:
  34. # Enforces a maximum line length.
  35. max_chars: 80
  36. # Specifies the character count for tab characters.
  37. tab_chars: 2
  38. # INDENT rule option.
  39. indent:
  40. # Available styles are 4(4-spaces), 2(2-spaces) or tab.
  41. style: 4
  42. # Specifies if it should stop considering and inserting new lines at the appropriate positions.
  43. # when the inner elements are on the same line. Default is false.
  44. not_insert_newline: true
  45. # QUOTE_CONSISTENT rule option.
  46. quote_consistent:
  47. # Available quote are "double" or "single".
  48. quote: double
  49. # ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH rule option.
  50. enum_field_names_zero_value_end_with:
  51. suffix: INVALID
  52. # SERVICE_NAMES_END_WITH rule option.
  53. service_names_end_with:
  54. text: Service
  55. # REPEATED_FIELD_NAMES_PLURALIZED rule option.
  56. ## The spec for each rules follows the implementation of https://github.com/gertd/go-pluralize.
  57. ## Plus, you can refer to this rule's test code.
  58. repeated_field_names_pluralized:
  59. uncountable_rules:
  60. - paper
  61. irregular_rules:
  62. Irregular: Regular