lint

package
v0.0.0-...-2262b47 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAll

func CheckAll(doc *xmlquery.Node, rules []*Rule, r report.Reporter) (results []string, err error)

CheckAll checks all rules in xml document

Types

type Rule

type Rule struct {
	Name    string `yaml: "name"`
	Targets string `yaml: "targets"`
	Having  string `yaml: "having"`
	Contain string `yaml: "contain"`
	Must    bool   `yaml: "must"`
}

Rule object to check

func (*Rule) Check

func (r *Rule) Check(doc *xmlquery.Node) (valid bool, node *xmlquery.Node, err error)

Check whole linting rule

func (*Rule) CheckIfCondition

func (r *Rule) CheckIfCondition(doc *xmlquery.Node) (suitable bool, err error)

CheckIfCondition checks if condition in rule for filtering document as suitable or not

func (*Rule) Lookup

func (r *Rule) Lookup(doc *xmlquery.Node) (found bool, node *xmlquery.Node, err error)

Lookup for xml node

func (*Rule) Validate

func (r *Rule) Validate(doc *xmlquery.Node) (valid bool, node *xmlquery.Node, err error)

Validate Shouldbe parameter

Jump to

Keyboard shortcuts

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