Documentation ¶
Index ¶
- Variables
- type Config
- func (*Config) Descriptor() ([]byte, []int)deprecated
- func (x *Config) GetAllowCommentIgnores() bool
- func (x *Config) GetEnumZeroValueSuffix() string
- func (x *Config) GetExceptIds() []string
- func (x *Config) GetIgnoreIdPaths() []*IDPaths
- func (x *Config) GetIgnorePaths() []string
- func (x *Config) GetRpcAllowGoogleProtobufEmptyRequests() bool
- func (x *Config) GetRpcAllowGoogleProtobufEmptyResponses() bool
- func (x *Config) GetRpcAllowSameRequestResponse() bool
- func (x *Config) GetServiceSuffix() string
- func (x *Config) GetUseIds() []string
- func (x *Config) GetVersion() string
- func (*Config) ProtoMessage()
- func (x *Config) ProtoReflect() protoreflect.Message
- func (x *Config) Reset()
- func (x *Config) String() string
- type IDPaths
Constants ¶
This section is empty.
Variables ¶
var File_buf_alpha_lint_v1_config_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // version represents the version of the lint rule and category IDs that should be used with this config. Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // use_ids lists the rule and/or category IDs that are included in the lint check. UseIds []string `protobuf:"bytes,2,rep,name=use_ids,json=useIds,proto3" json:"use_ids,omitempty"` // except_ids lists the rule and/or category IDs that are excluded from the lint check. ExceptIds []string `protobuf:"bytes,3,rep,name=except_ids,json=exceptIds,proto3" json:"except_ids,omitempty"` // 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. IgnorePaths []string `protobuf:"bytes,4,rep,name=ignore_paths,json=ignorePaths,proto3" json:"ignore_paths,omitempty"` // 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. IgnoreIdPaths []*IDPaths `protobuf:"bytes,5,rep,name=ignore_id_paths,json=ignoreIdPaths,proto3" json:"ignore_id_paths,omitempty"` // 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. EnumZeroValueSuffix string `protobuf:"bytes,6,opt,name=enum_zero_value_suffix,json=enumZeroValueSuffix,proto3" json:"enum_zero_value_suffix,omitempty"` // rpc_allow_same_request_response allows the same message type for both the request and response of an RPC. RpcAllowSameRequestResponse bool `` /* 149-byte string literal not displayed */ // rpc_allow_google_protobuf_empty_requests allows the RPC requests to use the google.protobuf.Empty message. RpcAllowGoogleProtobufEmptyRequests bool `` /* 175-byte string literal not displayed */ // rpc_allow_google_protobuf_empty_responses allows the RPC responses to use the google.protobuf.Empty message. RpcAllowGoogleProtobufEmptyResponses bool `` /* 178-byte string literal not displayed */ // 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. ServiceSuffix string `protobuf:"bytes,10,opt,name=service_suffix,json=serviceSuffix,proto3" json:"service_suffix,omitempty"` // allow_comment_ignores turns on comment-driven ignores. AllowCommentIgnores bool `protobuf:"varint,11,opt,name=allow_comment_ignores,json=allowCommentIgnores,proto3" json:"allow_comment_ignores,omitempty"` // contains filtered or unexported fields }
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.
func (*Config) Descriptor
deprecated
func (*Config) GetAllowCommentIgnores ¶
func (*Config) GetEnumZeroValueSuffix ¶
func (*Config) GetExceptIds ¶
func (*Config) GetIgnoreIdPaths ¶
func (*Config) GetIgnorePaths ¶
func (*Config) GetRpcAllowGoogleProtobufEmptyRequests ¶
func (*Config) GetRpcAllowGoogleProtobufEmptyResponses ¶
func (*Config) GetRpcAllowSameRequestResponse ¶
func (*Config) GetServiceSuffix ¶
func (*Config) GetVersion ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type IDPaths ¶
type IDPaths struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Paths []string `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"` // contains filtered or unexported fields }
IDPaths represents a rule or category ID and the file and/or directory paths that are ignored for the rule.
func (*IDPaths) Descriptor
deprecated
func (*IDPaths) ProtoMessage ¶
func (*IDPaths) ProtoMessage()
func (*IDPaths) ProtoReflect ¶
func (x *IDPaths) ProtoReflect() protoreflect.Message