Andrew Shannon Brown 909f628d75 Add linter for nolint
Linter can check that nolint statements are properly formatted and also that all
nolint statements are used.
2020-04-26 20:20:17 -07:00

32 lines
554 B
Go

package goanalysis
import (
"go/token"
"golang.org/x/tools/go/analysis"
"github.com/golangci/golangci-lint/pkg/result"
)
type Issue struct {
result.Issue
Pass *analysis.Pass
}
func NewIssue(i *result.Issue, pass *analysis.Pass) Issue {
return Issue{
Issue: *i,
Pass: pass,
}
}
type EncodingIssue struct {
FromLinter string
Text string
Pos token.Position
LineRange *result.Range
Replacement *result.Replacement
ExpectNoLint bool
ExpectedNoLintLinter string
}