lintv1

package
v0.0.0-...-a078c60 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetAllowCommentIgnores

func (x *Config) GetAllowCommentIgnores() bool

func (*Config) GetEnumZeroValueSuffix

func (x *Config) GetEnumZeroValueSuffix() string

func (*Config) GetExceptIds

func (x *Config) GetExceptIds() []string

func (*Config) GetIgnoreIdPaths

func (x *Config) GetIgnoreIdPaths() []*IDPaths

func (*Config) GetIgnorePaths

func (x *Config) GetIgnorePaths() []string

func (*Config) GetRpcAllowGoogleProtobufEmptyRequests

func (x *Config) GetRpcAllowGoogleProtobufEmptyRequests() bool

func (*Config) GetRpcAllowGoogleProtobufEmptyResponses

func (x *Config) GetRpcAllowGoogleProtobufEmptyResponses() bool

func (*Config) GetRpcAllowSameRequestResponse

func (x *Config) GetRpcAllowSameRequestResponse() bool

func (*Config) GetServiceSuffix

func (x *Config) GetServiceSuffix() string

func (*Config) GetUseIds

func (x *Config) GetUseIds() []string

func (*Config) GetVersion

func (x *Config) GetVersion() string

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use IDPaths.ProtoReflect.Descriptor instead.

func (*IDPaths) GetId

func (x *IDPaths) GetId() string

func (*IDPaths) GetPaths

func (x *IDPaths) GetPaths() []string

func (*IDPaths) ProtoMessage

func (*IDPaths) ProtoMessage()

func (*IDPaths) ProtoReflect

func (x *IDPaths) ProtoReflect() protoreflect.Message

func (*IDPaths) Reset

func (x *IDPaths) Reset()

func (*IDPaths) String

func (x *IDPaths) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL