lint

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageLint

type ImageLint struct {
	Path     string
	Status   string
	Position Position
}

type ImageLintConfig

type ImageLintConfig struct {
	IncludeExts       []string               `yaml:"includeExts"`
	MatchPattern      []string               `yaml:"matchPattern"`
	IncludeLines      []string               `yaml:"includeLines"`
	IgnoreImages      []string               `yaml:"ignoreImages"`
	SuccessValidators []string               `yaml:"succesValidators"`
	FailureValidators []string               `yaml:"failureValidators"`
	ImageMap          map[string][]ImageLint // consists map as the key and file details as values
}

func New

func New(configFile string) (*ImageLintConfig, error)

func NewFromContent

func NewFromContent(content []byte) (*ImageLintConfig, error)

func (*ImageLintConfig) CanIgnoreImage added in v0.2.0

func (imc *ImageLintConfig) CanIgnoreImage(line string) bool

func (*ImageLintConfig) Init

func (imc *ImageLintConfig) Init(dir string) error

func (*ImageLintConfig) OnFail

func (imc *ImageLintConfig) OnFail(message, image string)

func (*ImageLintConfig) OnNotIdentifed

func (imc *ImageLintConfig) OnNotIdentifed(message, image string)

func (*ImageLintConfig) OnPass

func (imc *ImageLintConfig) OnPass(message, image string)

func (*ImageLintConfig) OnPullFail

func (imc *ImageLintConfig) OnPullFail(message, image string)

func (*ImageLintConfig) ReadFile

func (imc *ImageLintConfig) ReadFile(path string) error

func (*ImageLintConfig) ShowFailSummary

func (imc *ImageLintConfig) ShowFailSummary()

func (*ImageLintConfig) ShowNotIdentifiedSummary

func (imc *ImageLintConfig) ShowNotIdentifiedSummary()

func (*ImageLintConfig) ShowPassSummary

func (imc *ImageLintConfig) ShowPassSummary()

func (*ImageLintConfig) ShowPullFailedSummary

func (imc *ImageLintConfig) ShowPullFailedSummary()

func (*ImageLintConfig) ShowSummary

func (imc *ImageLintConfig) ShowSummary()

type Position

type Position struct {
	Row, Col int
}

Jump to

Keyboard shortcuts

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