customrules

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnumNamesLowerSnakeCaseRule

type EnumNamesLowerSnakeCaseRule struct{}

EnumNamesLowerSnakeCaseRule verifies that all enum names are LowerSnakeCase.

func NewEnumNamesLowerSnakeCaseRule

func NewEnumNamesLowerSnakeCaseRule() EnumNamesLowerSnakeCaseRule

NewEnumNamesLowerSnakeCaseRule creates a new EnumNamesLowerSnakeCaseRule.

func (EnumNamesLowerSnakeCaseRule) Apply

Apply applies the rule to the proto.

func (EnumNamesLowerSnakeCaseRule) ID

ID returns the ID of this rule.

func (EnumNamesLowerSnakeCaseRule) IsOfficial

func (r EnumNamesLowerSnakeCaseRule) IsOfficial() bool

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

func (EnumNamesLowerSnakeCaseRule) Purpose

func (r EnumNamesLowerSnakeCaseRule) Purpose() string

Purpose returns the purpose of this rule.

type SimpleRule

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

SimpleRule verifies that all enum names are LowerSnakeCase.

func NewSimpleRule

func NewSimpleRule(
	verbose bool,
	fixMode bool,
) SimpleRule

NewSimpleRule creates a new SimpleRule.

func (SimpleRule) Apply

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

Apply applies the rule to the proto.

func (SimpleRule) ID

func (r SimpleRule) ID() string

ID returns the ID of this rule.

func (SimpleRule) IsOfficial

func (r SimpleRule) IsOfficial() bool

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

func (SimpleRule) Purpose

func (r SimpleRule) 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