rule

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2019 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HasApply

type HasApply interface {
	// Apply applies the rule to the proto.
	Apply(proto *parser.Proto) ([]report.Failure, error)
}

HasApply represents a rule which can be applied.

type HasID

type HasID interface {
	// ID returns the ID of this rule. This should be all UPPER_SNAKE_CASE.
	ID() string
}

HasID represents a rule with ID.

type HasIsOfficial

type HasIsOfficial interface {
	// IsOfficial decides whether or not this rule belongs to the official guide.
	IsOfficial() bool
}

HasIsOfficial represents a rule with IsOfficial.

type HasPurpose

type HasPurpose interface {
	// Purpose returns the purpose of this rule. This should be a human-readable string.
	Purpose() string
}

HasPurpose represents a rule with Purpose.

type Rule

type Rule interface {
	HasApply
	HasID
	HasPurpose
	HasIsOfficial
}

Rule represents a rule which a linter can apply.

Jump to

Keyboard shortcuts

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