linting

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LEVEL_ERROR   = "error"
	LEVEL_WARNING = "warning"
	LEVEL_INFO    = "info"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Issue

type Issue struct {
	Level   string
	Message string
	Rule    string
}

func Validate

func Validate(rm *roadmap.Roadmap) []Issue

/ Validate will run all of the registered rules against the provided road map and return / a list of issues that were found.

func (*Issue) Error

func (i *Issue) Error() string

func (*Issue) IsError

func (i *Issue) IsError() bool

func (*Issue) String

func (i *Issue) String() string

type Rule

type Rule interface {
	Validate(*roadmap.Roadmap) []Issue
}

func RuleFromFunction

func RuleFromFunction(fn func(*roadmap.Roadmap) []Issue) Rule

/ RuleFromFunction creates a new rule implementation based on the provided function.

Jump to

Keyboard shortcuts

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