rules

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2019 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnumFieldNamesUpperSnakeCaseRule

type EnumFieldNamesUpperSnakeCaseRule struct{}

EnumFieldNamesUpperSnakeCaseRule verifies that all enum field names are CAPITALS_WITH_UNDERSCORES. See https://developers.google.com/protocol-buffers/docs/style#enums.

func NewEnumFieldNamesUpperSnakeCaseRule

func NewEnumFieldNamesUpperSnakeCaseRule() EnumFieldNamesUpperSnakeCaseRule

NewEnumFieldNamesUpperSnakeCaseRule creates a new EnumFieldNamesUpperSnakeCaseRule.

func (EnumFieldNamesUpperSnakeCaseRule) Apply

Apply applies the rule to the proto.

func (EnumFieldNamesUpperSnakeCaseRule) ID

ID returns the ID of this rule.

func (EnumFieldNamesUpperSnakeCaseRule) IsOfficial added in v0.10.0

func (r EnumFieldNamesUpperSnakeCaseRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (EnumFieldNamesUpperSnakeCaseRule) Purpose

Purpose returns the purpose of this rule.

type EnumFieldNamesZeroValueEndWithRule added in v0.10.0

type EnumFieldNamesZeroValueEndWithRule struct {
	// contains filtered or unexported fields
}

EnumFieldNamesZeroValueEndWithRule verifies that the zero value enum should have the suffix (e.g. "UNSPECIFIED", "INVALID"). See https://developers.google.com/protocol-buffers/docs/style#enums.

func NewEnumFieldNamesZeroValueEndWithRule added in v0.10.0

func NewEnumFieldNamesZeroValueEndWithRule(
	suffix string,
) EnumFieldNamesZeroValueEndWithRule

NewEnumFieldNamesZeroValueEndWithRule creates a new EnumFieldNamesZeroValueEndWithRule.

func (EnumFieldNamesZeroValueEndWithRule) Apply added in v0.10.0

Apply applies the rule to the proto.

func (EnumFieldNamesZeroValueEndWithRule) ID added in v0.10.0

ID returns the ID of this rule.

func (EnumFieldNamesZeroValueEndWithRule) IsOfficial added in v0.10.0

IsOfficial decides whether or not this rule belongs to the official guide.

func (EnumFieldNamesZeroValueEndWithRule) Purpose added in v0.10.0

Purpose returns the purpose of this rule.

type EnumFieldsHaveCommentRule added in v0.13.0

type EnumFieldsHaveCommentRule struct {
	// contains filtered or unexported fields
}

EnumFieldsHaveCommentRule verifies that all enumFields have a comment.

func NewEnumFieldsHaveCommentRule added in v0.13.0

func NewEnumFieldsHaveCommentRule(
	shouldFollowGolangStyle bool,
) EnumFieldsHaveCommentRule

NewEnumFieldsHaveCommentRule creates a new EnumFieldsHaveCommentRule.

func (EnumFieldsHaveCommentRule) Apply added in v0.13.0

Apply applies the rule to the proto.

func (EnumFieldsHaveCommentRule) ID added in v0.13.0

ID returns the ID of this rule.

func (EnumFieldsHaveCommentRule) IsOfficial added in v0.13.0

func (r EnumFieldsHaveCommentRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (EnumFieldsHaveCommentRule) Purpose added in v0.13.0

func (r EnumFieldsHaveCommentRule) Purpose() string

Purpose returns the purpose of this rule.

type EnumNamesUpperCamelCaseRule

type EnumNamesUpperCamelCaseRule struct{}

EnumNamesUpperCamelCaseRule verifies that all enum names are CamelCase (with an initial capital). See https://developers.google.com/protocol-buffers/docs/style#enums.

func NewEnumNamesUpperCamelCaseRule

func NewEnumNamesUpperCamelCaseRule() EnumNamesUpperCamelCaseRule

NewEnumNamesUpperCamelCaseRule creates a new EnumNamesUpperCamelCaseRule.

func (EnumNamesUpperCamelCaseRule) Apply

Apply applies the rule to the proto.

func (EnumNamesUpperCamelCaseRule) ID

ID returns the ID of this rule.

func (EnumNamesUpperCamelCaseRule) IsOfficial added in v0.10.0

func (r EnumNamesUpperCamelCaseRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (EnumNamesUpperCamelCaseRule) Purpose

func (r EnumNamesUpperCamelCaseRule) Purpose() string

Purpose returns the purpose of this rule.

type EnumsHaveCommentRule added in v0.13.0

type EnumsHaveCommentRule struct {
	// contains filtered or unexported fields
}

EnumsHaveCommentRule verifies that all enums have a comment.

func NewEnumsHaveCommentRule added in v0.13.0

func NewEnumsHaveCommentRule(
	shouldFollowGolangStyle bool,
) EnumsHaveCommentRule

NewEnumsHaveCommentRule creates a new EnumsHaveCommentRule.

func (EnumsHaveCommentRule) Apply added in v0.13.0

func (r EnumsHaveCommentRule) Apply(proto *parser.Proto) ([]report.Failure, error)

Apply applies the rule to the proto.

func (EnumsHaveCommentRule) ID added in v0.13.0

ID returns the ID of this rule.

func (EnumsHaveCommentRule) IsOfficial added in v0.13.0

func (r EnumsHaveCommentRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (EnumsHaveCommentRule) Purpose added in v0.13.0

func (r EnumsHaveCommentRule) Purpose() string

Purpose returns the purpose of this rule.

type FieldNamesExcludePrepositionsRule added in v0.10.0

type FieldNamesExcludePrepositionsRule struct {
	// contains filtered or unexported fields
}

FieldNamesExcludePrepositionsRule verifies that all field names don't include prepositions (e.g. "for", "during", "at"). It is assumed that the field names are underscore_separated_names. See https://cloud.google.com/apis/design/naming_convention#field_names.

func NewFieldNamesExcludePrepositionsRule added in v0.10.0

func NewFieldNamesExcludePrepositionsRule(
	prepositions []string,
	excludes []string,
) FieldNamesExcludePrepositionsRule

NewFieldNamesExcludePrepositionsRule creates a new FieldNamesExcludePrepositionsRule.

func (FieldNamesExcludePrepositionsRule) Apply added in v0.10.0

Apply applies the rule to the proto.

func (FieldNamesExcludePrepositionsRule) ID added in v0.10.0

ID returns the ID of this rule.

func (FieldNamesExcludePrepositionsRule) IsOfficial added in v0.10.0

func (r FieldNamesExcludePrepositionsRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (FieldNamesExcludePrepositionsRule) Purpose added in v0.10.0

Purpose returns the purpose of this rule.

type FieldNamesLowerSnakeCaseRule

type FieldNamesLowerSnakeCaseRule struct{}

FieldNamesLowerSnakeCaseRule verifies that all field names are underscore_separated_names. See https://developers.google.com/protocol-buffers/docs/style#message-and-field-names.

func NewFieldNamesLowerSnakeCaseRule

func NewFieldNamesLowerSnakeCaseRule() FieldNamesLowerSnakeCaseRule

NewFieldNamesLowerSnakeCaseRule creates a new FieldNamesLowerSnakeCaseRule.

func (FieldNamesLowerSnakeCaseRule) Apply

Apply applies the rule to the proto.

func (FieldNamesLowerSnakeCaseRule) ID

ID returns the ID of this rule.

func (FieldNamesLowerSnakeCaseRule) IsOfficial added in v0.10.0

func (r FieldNamesLowerSnakeCaseRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (FieldNamesLowerSnakeCaseRule) Purpose

Purpose returns the purpose of this rule.

type FieldsHaveCommentRule added in v0.13.0

type FieldsHaveCommentRule struct {
	// contains filtered or unexported fields
}

FieldsHaveCommentRule verifies that all fields have a comment.

func NewFieldsHaveCommentRule added in v0.13.0

func NewFieldsHaveCommentRule(
	shouldFollowGolangStyle bool,
) FieldsHaveCommentRule

NewFieldsHaveCommentRule creates a new FieldsHaveCommentRule.

func (FieldsHaveCommentRule) Apply added in v0.13.0

func (r FieldsHaveCommentRule) Apply(proto *parser.Proto) ([]report.Failure, error)

Apply applies the rule to the proto.

func (FieldsHaveCommentRule) ID added in v0.13.0

ID returns the ID of this rule.

func (FieldsHaveCommentRule) IsOfficial added in v0.13.0

func (r FieldsHaveCommentRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (FieldsHaveCommentRule) Purpose added in v0.13.0

func (r FieldsHaveCommentRule) Purpose() string

Purpose returns the purpose of this rule.

type FileNamesLowerSnakeCaseRule added in v0.10.0

type FileNamesLowerSnakeCaseRule struct {
	// contains filtered or unexported fields
}

FileNamesLowerSnakeCaseRule verifies that all file names are lower_snake_case.proto. See https://developers.google.com/protocol-buffers/docs/style#file-structure.

func NewFileNamesLowerSnakeCaseRule added in v0.10.0

func NewFileNamesLowerSnakeCaseRule(
	excluded []string,
) FileNamesLowerSnakeCaseRule

NewFileNamesLowerSnakeCaseRule creates a new FileNamesLowerSnakeCaseRule.

func (FileNamesLowerSnakeCaseRule) Apply added in v0.10.0

Apply applies the rule to the proto.

func (FileNamesLowerSnakeCaseRule) ID added in v0.10.0

ID returns the ID of this rule.

func (FileNamesLowerSnakeCaseRule) IsOfficial added in v0.10.0

func (r FileNamesLowerSnakeCaseRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (FileNamesLowerSnakeCaseRule) Purpose added in v0.10.0

func (r FileNamesLowerSnakeCaseRule) Purpose() string

Purpose returns the purpose of this rule.

type ImportsSortedRule added in v0.11.0

type ImportsSortedRule struct {
	// contains filtered or unexported fields
}

ImportsSortedRule enforces sorted imports.

func NewImportsSortedRule added in v0.11.0

func NewImportsSortedRule(
	newline string,
	fixMode bool,
) ImportsSortedRule

NewImportsSortedRule creates a new ImportsSortedRule.

func (ImportsSortedRule) Apply added in v0.11.0

func (r ImportsSortedRule) Apply(
	proto *parser.Proto,
) ([]report.Failure, error)

Apply applies the rule to the proto.

func (ImportsSortedRule) ID added in v0.11.0

func (r ImportsSortedRule) ID() string

ID returns the ID of this rule.

func (ImportsSortedRule) IsOfficial added in v0.11.0

func (r ImportsSortedRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (ImportsSortedRule) Purpose added in v0.11.0

func (r ImportsSortedRule) Purpose() string

Purpose returns the purpose of this rule.

type IndentRule

type IndentRule struct {
	// contains filtered or unexported fields
}

IndentRule enforces a consistent indentation style.

func NewIndentRule

func NewIndentRule(
	style string,
	newline string,
	fixMode bool,
) IndentRule

NewIndentRule creates a new IndentRule.

func (IndentRule) Apply

func (r IndentRule) Apply(
	proto *parser.Proto,
) ([]report.Failure, error)

Apply applies the rule to the proto.

func (IndentRule) ID

func (r IndentRule) ID() string

ID returns the ID of this rule.

func (IndentRule) IsOfficial added in v0.10.0

func (r IndentRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (IndentRule) Purpose

func (r IndentRule) Purpose() string

Purpose returns the purpose of this rule.

type MaxLineLengthRule

type MaxLineLengthRule struct {
	// contains filtered or unexported fields
}

MaxLineLengthRule enforces a maximum line length to increase code readability and maintainability. The length of a line is defined as the number of Unicode characters in the line.

func NewMaxLineLengthRule

func NewMaxLineLengthRule(
	maxChars int,
	tabChars int,
) MaxLineLengthRule

NewMaxLineLengthRule creates a new MaxLineLengthRule.

func (MaxLineLengthRule) Apply

func (r MaxLineLengthRule) Apply(proto *parser.Proto) (
	failures []report.Failure,
	err error,
)

Apply applies the rule to the proto.

func (MaxLineLengthRule) ID

func (r MaxLineLengthRule) ID() string

ID returns the ID of this rule.

func (MaxLineLengthRule) IsOfficial added in v0.10.0

func (r MaxLineLengthRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (MaxLineLengthRule) Purpose

func (r MaxLineLengthRule) Purpose() string

Purpose returns the purpose of this rule.

type MessageNamesExcludePrepositionsRule added in v0.10.0

type MessageNamesExcludePrepositionsRule struct {
	// contains filtered or unexported fields
}

MessageNamesExcludePrepositionsRule verifies that all message names don't include prepositions (e.g. "With", "For"). It is assumed that the message names are CamelCase (with an initial capital). See https://cloud.google.com/apis/design/naming_convention#message_names.

func NewMessageNamesExcludePrepositionsRule added in v0.10.0

func NewMessageNamesExcludePrepositionsRule(
	prepositions []string,
	excludes []string,
) MessageNamesExcludePrepositionsRule

NewMessageNamesExcludePrepositionsRule creates a new MessageNamesExcludePrepositionsRule.

func (MessageNamesExcludePrepositionsRule) Apply added in v0.10.0

Apply applies the rule to the proto.

func (MessageNamesExcludePrepositionsRule) ID added in v0.10.0

ID returns the ID of this rule.

func (MessageNamesExcludePrepositionsRule) IsOfficial added in v0.10.0

IsOfficial decides whether or not this rule belongs to the official guide.

func (MessageNamesExcludePrepositionsRule) Purpose added in v0.10.0

Purpose returns the purpose of this rule.

type MessageNamesUpperCamelCaseRule

type MessageNamesUpperCamelCaseRule struct{}

MessageNamesUpperCamelCaseRule verifies that all message names are CamelCase (with an initial capital). See https://developers.google.com/protocol-buffers/docs/style#message-and-field-names.

func NewMessageNamesUpperCamelCaseRule

func NewMessageNamesUpperCamelCaseRule() MessageNamesUpperCamelCaseRule

NewMessageNamesUpperCamelCaseRule creates a new MessageNamesUpperCamelCaseRule.

func (MessageNamesUpperCamelCaseRule) Apply

Apply applies the rule to the proto.

func (MessageNamesUpperCamelCaseRule) ID

ID returns the ID of this rule.

func (MessageNamesUpperCamelCaseRule) IsOfficial added in v0.10.0

func (r MessageNamesUpperCamelCaseRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (MessageNamesUpperCamelCaseRule) Purpose

Purpose returns the purpose of this rule.

type MessagesHaveCommentRule added in v0.13.0

type MessagesHaveCommentRule struct {
	// contains filtered or unexported fields
}

MessagesHaveCommentRule verifies that all messages have a comment.

func NewMessagesHaveCommentRule added in v0.13.0

func NewMessagesHaveCommentRule(
	shouldFollowGolangStyle bool,
) MessagesHaveCommentRule

NewMessagesHaveCommentRule creates a new MessagesHaveCommentRule.

func (MessagesHaveCommentRule) Apply added in v0.13.0

func (r MessagesHaveCommentRule) Apply(proto *parser.Proto) ([]report.Failure, error)

Apply applies the rule to the proto.

func (MessagesHaveCommentRule) ID added in v0.13.0

ID returns the ID of this rule.

func (MessagesHaveCommentRule) IsOfficial added in v0.13.0

func (r MessagesHaveCommentRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (MessagesHaveCommentRule) Purpose added in v0.13.0

func (r MessagesHaveCommentRule) Purpose() string

Purpose returns the purpose of this rule.

type OrderRule added in v0.13.0

type OrderRule struct{}

OrderRule verifies that all files should be ordered in the following manner: 1. Syntax 2. Package 3. Imports (sorted) 4. File options 5. Everything else See https://developers.google.com/protocol-buffers/docs/style#file-structure.

func NewOrderRule added in v0.13.0

func NewOrderRule() OrderRule

NewOrderRule creates a new OrderRule.

func (OrderRule) Apply added in v0.13.0

func (r OrderRule) Apply(proto *parser.Proto) ([]report.Failure, error)

Apply applies the rule to the proto.

func (OrderRule) ID added in v0.13.0

func (r OrderRule) ID() string

ID returns the ID of this rule.

func (OrderRule) IsOfficial added in v0.13.0

func (r OrderRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (OrderRule) Purpose added in v0.13.0

func (r OrderRule) Purpose() string

Purpose returns the purpose of this rule.

type PackageNameLowerCaseRule added in v0.13.0

type PackageNameLowerCaseRule struct{}

PackageNameLowerCaseRule verifies that the package name only contains lowercase letters, digits and/or periods. See https://developers.google.com/protocol-buffers/docs/style#packages.

func NewPackageNameLowerCaseRule added in v0.13.0

func NewPackageNameLowerCaseRule() PackageNameLowerCaseRule

NewPackageNameLowerCaseRule creates a new PackageNameLowerCaseRule.

func (PackageNameLowerCaseRule) Apply added in v0.13.0

Apply applies the rule to the proto.

func (PackageNameLowerCaseRule) ID added in v0.13.0

ID returns the ID of this rule.

func (PackageNameLowerCaseRule) IsOfficial added in v0.13.0

func (r PackageNameLowerCaseRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (PackageNameLowerCaseRule) Purpose added in v0.13.0

func (r PackageNameLowerCaseRule) Purpose() string

Purpose returns the purpose of this rule.

type RPCNamesUpperCamelCaseRule

type RPCNamesUpperCamelCaseRule struct{}

RPCNamesUpperCamelCaseRule verifies that all rpc names are CamelCase (with an initial capital). See https://developers.google.com/protocol-buffers/docs/style#services.

func NewRPCNamesUpperCamelCaseRule

func NewRPCNamesUpperCamelCaseRule() RPCNamesUpperCamelCaseRule

NewRPCNamesUpperCamelCaseRule creates a new RPCNamesUpperCamelCaseRule.

func (RPCNamesUpperCamelCaseRule) Apply

Apply applies the rule to the proto.

func (RPCNamesUpperCamelCaseRule) ID

ID returns the ID of this rule.

func (RPCNamesUpperCamelCaseRule) IsOfficial added in v0.10.0

func (r RPCNamesUpperCamelCaseRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (RPCNamesUpperCamelCaseRule) Purpose

func (r RPCNamesUpperCamelCaseRule) Purpose() string

Purpose returns the purpose of this rule.

type RPCsHaveCommentRule added in v0.13.0

type RPCsHaveCommentRule struct {
	// contains filtered or unexported fields
}

RPCsHaveCommentRule verifies that all rpcs have a comment.

func NewRPCsHaveCommentRule added in v0.13.0

func NewRPCsHaveCommentRule(
	shouldFollowGolangStyle bool,
) RPCsHaveCommentRule

NewRPCsHaveCommentRule creates a new RPCsHaveCommentRule.

func (RPCsHaveCommentRule) Apply added in v0.13.0

func (r RPCsHaveCommentRule) Apply(proto *parser.Proto) ([]report.Failure, error)

Apply applies the rule to the proto.

func (RPCsHaveCommentRule) ID added in v0.13.0

func (r RPCsHaveCommentRule) ID() string

ID returns the ID of this rule.

func (RPCsHaveCommentRule) IsOfficial added in v0.13.0

func (r RPCsHaveCommentRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (RPCsHaveCommentRule) Purpose added in v0.13.0

func (r RPCsHaveCommentRule) Purpose() string

Purpose returns the purpose of this rule.

type ServiceNamesEndWithRule added in v0.9.2

type ServiceNamesEndWithRule struct {
	// contains filtered or unexported fields
}

ServiceNamesEndWithRule verifies that all service names end with the specified value.

func NewServiceNamesEndWithRule added in v0.9.2

func NewServiceNamesEndWithRule(text string) ServiceNamesEndWithRule

NewServiceNamesEndWithRule creates a new ServiceNamesEndWithRule.

func (ServiceNamesEndWithRule) Apply added in v0.9.2

func (r ServiceNamesEndWithRule) Apply(proto *parser.Proto) ([]report.Failure, error)

Apply applies the rule to the proto.

func (ServiceNamesEndWithRule) ID added in v0.9.2

ID returns the ID of this rule.

func (ServiceNamesEndWithRule) IsOfficial added in v0.10.0

func (r ServiceNamesEndWithRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (ServiceNamesEndWithRule) Purpose added in v0.9.2

func (r ServiceNamesEndWithRule) Purpose() string

Purpose returns the purpose of this rule.

type ServiceNamesUpperCamelCaseRule

type ServiceNamesUpperCamelCaseRule struct{}

ServiceNamesUpperCamelCaseRule verifies that all service names are CamelCase (with an initial capital). See https://developers.google.com/protocol-buffers/docs/style#services.

func NewServiceNamesUpperCamelCaseRule

func NewServiceNamesUpperCamelCaseRule() ServiceNamesUpperCamelCaseRule

NewServiceNamesUpperCamelCaseRule creates a new ServiceNamesUpperCamelCaseRule.

func (ServiceNamesUpperCamelCaseRule) Apply

Apply applies the rule to the proto.

func (ServiceNamesUpperCamelCaseRule) ID

ID returns the ID of this rule.

func (ServiceNamesUpperCamelCaseRule) IsOfficial added in v0.10.0

func (r ServiceNamesUpperCamelCaseRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (ServiceNamesUpperCamelCaseRule) Purpose

Purpose returns the purpose of this rule.

type ServicesHaveCommentRule added in v0.13.0

type ServicesHaveCommentRule struct {
	// contains filtered or unexported fields
}

ServicesHaveCommentRule verifies that all services have a comment.

func NewServicesHaveCommentRule added in v0.13.0

func NewServicesHaveCommentRule(
	shouldFollowGolangStyle bool,
) ServicesHaveCommentRule

NewServicesHaveCommentRule creates a new ServicesHaveCommentRule.

func (ServicesHaveCommentRule) Apply added in v0.13.0

func (r ServicesHaveCommentRule) Apply(proto *parser.Proto) ([]report.Failure, error)

Apply applies the rule to the proto.

func (ServicesHaveCommentRule) ID added in v0.13.0

ID returns the ID of this rule.

func (ServicesHaveCommentRule) IsOfficial added in v0.13.0

func (r ServicesHaveCommentRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (ServicesHaveCommentRule) Purpose added in v0.13.0

func (r ServicesHaveCommentRule) Purpose() string

Purpose returns the purpose of this rule.

type SyntaxConsistentRule added in v0.17.0

type SyntaxConsistentRule struct {
	// contains filtered or unexported fields
}

SyntaxConsistentRule verifies that syntax is a specified version.

func NewSyntaxConsistentRule added in v0.17.0

func NewSyntaxConsistentRule(
	version string,
) SyntaxConsistentRule

NewSyntaxConsistentRule creates a new SyntaxConsistentRule.

func (SyntaxConsistentRule) Apply added in v0.17.0

func (r SyntaxConsistentRule) Apply(proto *parser.Proto) ([]report.Failure, error)

Apply applies the rule to the proto.

func (SyntaxConsistentRule) ID added in v0.17.0

ID returns the ID of this rule.

func (SyntaxConsistentRule) IsOfficial added in v0.17.0

func (r SyntaxConsistentRule) IsOfficial() bool

IsOfficial decides whether or not this rule belongs to the official guide.

func (SyntaxConsistentRule) Purpose added in v0.17.0

func (r SyntaxConsistentRule) Purpose() string

Purpose returns the purpose of this rule.

Jump to

Keyboard shortcuts

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