parser

package
v0.18.5 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPath = []string{"."}

DefaultPath is the default path if no paths are provided

Functions

This section is empty.

Types

type Parser

type Parser struct {
	Rules   []*rule.Rule
	Ignorer *ignore.Ignore
	// contains filtered or unexported fields
}

Parser parses files and finds lines that break rules

func NewParser

func NewParser(rules []*rule.Rule, ignorer *ignore.Ignore) *Parser

NewParser returns a pointer to a Parser that is used to check for findings based on the rules provided, ignoring files based on the ignorer provided

func (*Parser) ParsePaths

func (p *Parser) ParsePaths(print printer.Printer, paths ...string) int

ParsePaths parses all files provided and returns the number of files with findings

Jump to

Keyboard shortcuts

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