Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
authorJames Fargher <jfargher@gitlab.com>2022-04-06 02:06:40 +0300
committerJames Fargher <jfargher@gitlab.com>2022-04-29 02:14:24 +0300
commit317c59fc930dee8ce68d39cb798460b760bde46b (patch)
tree99d44a96fe50fd172748e908fb92b577197c0cfe /proto
parentfce0a7487ccf90a866bf6a2428b23b428cd67c5c (diff)
Add protolint to Makefile
From https://github.com/yoheimuta/protolint this linter is configurable and much more strict than protoc.
Diffstat (limited to 'proto')
-rw-r--r--proto/.protolint.yaml32
1 files changed, 32 insertions, 0 deletions
diff --git a/proto/.protolint.yaml b/proto/.protolint.yaml
new file mode 100644
index 000000000..995f81bb7
--- /dev/null
+++ b/proto/.protolint.yaml
@@ -0,0 +1,32 @@
+---
+lint:
+ rules:
+ all_default: true
+ remove:
+ # Our use of enums isn't conforming to best practices, and it's hard to
+ # change retroactively. We may eventually enable these linters and then
+ # create exceptions for preexisting definitions.
+ - ENUM_FIELD_NAMES_PREFIX
+ - ENUM_FIELD_NAMES_ZERO_VALUE_END_WITH
+ # We don't specify any line length limits.
+ - MAX_LINE_LENGTH
+ # Many of our definitions aren't commented at all. We want to eventually
+ # opt-in to enable these linting warnings, but right now we just want to
+ # get protolint included in our workflow with minimal required changes.
+ - FILE_HAS_COMMENT
+ - RPCS_HAVE_COMMENT
+ - FIELDS_HAVE_COMMENT
+ - SERVICES_HAVE_COMMENT
+ - MESSAGES_HAVE_COMMENT
+ - ENUMS_HAVE_COMMENT
+ - ENUM_FIELDS_HAVE_COMMENT
+ # Many of our fields and messages have prepositions in them, and
+ # furthermore this rule doesn't feel all that sensible after all. We thus
+ # disable it.
+ - FIELD_NAMES_EXCLUDE_PREPOSITIONS
+ - MESSAGE_NAMES_EXCLUDE_PREPOSITIONS
+
+ rules_option:
+ file_names_lower_snake_case:
+ excludes:
+ - proto/repository-service.proto