blob: 03f856ea01aa9a6d0b667d95ac1a72ecf22a9060 [file] [log] [blame]
syntax = "proto3";
package bufman.dubbo.apache.org.lint.v1;
// Config represents the lint configuration for a module. The rule and category IDs are defined
// by the version and apply across the config. The version is independent of the version of
// the package. The package version refers to the config shape, the version encoded in the Config message
// indicates which rule and category IDs should be used.
//
// The rule and category IDs are not encoded as enums in this package because we may want to support custom rule
// and category IDs in the future. Callers will need to resolve the rule and category ID strings.
message Config {
// version represents the version of the lint rule and category IDs that should be used with this config.
string version = 1;
// use_ids lists the rule and/or category IDs that are included in the lint check.
repeated string use_ids = 2;
// except_ids lists the rule and/or category IDs that are excluded from the lint check.
repeated string except_ids = 3;
// ignore_paths lists the paths of directories and/or files that should be ignored by the lint check.
// All paths are relative to the root of the module.
repeated string ignore_paths = 4;
// ignore_id_paths is a map of rule and/or category IDs to directory and/or file paths to exclude from the
// lint check. This corresponds with the ignore_only configuration key.
repeated IDPaths ignore_id_paths = 5;
// enum_zero_value_suffix controls the behavior of the ENUM_ZERO_VALUE lint rule ID. By default, this rule
// verifies that the zero value of all enums ends in _UNSPECIFIED. This config allows the user to override
// this value with the given string.
string enum_zero_value_suffix = 6;
// rpc_allow_same_request_response allows the same message type for both the request and response of an RPC.
bool rpc_allow_same_request_response = 7;
// rpc_allow_google_protobuf_empty_requests allows the RPC requests to use the google.protobuf.Empty message.
bool rpc_allow_google_protobuf_empty_requests = 8;
// rpc_allow_google_protobuf_empty_responses allows the RPC responses to use the google.protobuf.Empty message.
bool rpc_allow_google_protobuf_empty_responses = 9;
// service_suffix applies to the SERVICE_SUFFIX rule ID. By default, the rule verifies that all service names
// end with the suffix Service. This allows users to override the value with the given string.
string service_suffix = 10;
// allow_comment_ignores turns on comment-driven ignores.
bool allow_comment_ignores = 11;
}
// IDPaths represents a rule or category ID and the file and/or directory paths that are ignored for the rule.
message IDPaths {
string id = 1;
repeated string paths = 2;
}