Documentation ¶
Overview ¶
Package checker can load files/packages and run linters on them
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker is the coordinator/executor of the linting process
func NewChecker ¶
NewChecker constructs a new checker according to the provided arguments
func (*Checker) Load ¶
Load loads/parses the specified paths see imports.ResolvePaths how paths are resolved
func (*Checker) Run ¶
func (c *Checker) Run() []*issue.LinterIssue
Run runs the checker on the loaded paths
type FileWriter ¶
type FileWriter struct {
// contains filtered or unexported fields
}
FileWriter implements the IssueWriter interface and writes the issues serialized by the outtemplate to the provided files
func (*FileWriter) Write ¶
func (w *FileWriter) Write(issue *issue.LinterIssue)
type IssueReporter ¶
type IssueReporter struct {
// contains filtered or unexported fields
}
IssueReporter implements the api.Reporter interface and filters/collects issues and passes them to the writer
type IssueReporterEntry ¶
type IssueReporterEntry struct { *IssueReporter // contains filtered or unexported fields }
IssueReporterEntry is a concrete reporter of a linter's invocation
func (*IssueReporterEntry) Debug ¶
func (r *IssueReporterEntry) Debug(msg string, fields ...interface{})
Debug prints debug messages
func (*IssueReporterEntry) Report ¶
func (r *IssueReporterEntry) Report(iss *api.Issue)
Report checks if an issue gets filtered if so the issue is ignored otherwise it adds the issue to the list of all issues and passes it to the writer
type IssueWriter ¶
type IssueWriter interface {
Write(issue *issue.LinterIssue)
}
IssueWriter writes an issue to a target
Directories ¶
Path | Synopsis |
---|---|
Package filter provides filters to filter out excluded issues
|
Package filter provides filters to filter out excluded issues |
Package issue provides models/helpers to the internal representation of issues
|
Package issue provides models/helpers to the internal representation of issues |