2019-10-13 17:40:51 +03:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2024-03-05 19:02:58 +02:00
|
|
|
func NewIssue(issue *result.Issue, pass *analysis.Pass) Issue {
|
2019-10-13 17:40:51 +03:00
|
|
|
return Issue{
|
2024-03-05 19:02:58 +02:00
|
|
|
Issue: *issue,
|
2019-10-13 17:40:51 +03:00
|
|
|
Pass: pass,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
type EncodingIssue struct {
|
2020-04-26 19:30:14 -07:00
|
|
|
FromLinter string
|
|
|
|
Text string
|
2024-03-09 15:28:42 +01:00
|
|
|
Severity string
|
2020-04-26 19:30:14 -07:00
|
|
|
Pos token.Position
|
|
|
|
LineRange *result.Range
|
|
|
|
Replacement *result.Replacement
|
|
|
|
ExpectNoLint bool
|
|
|
|
ExpectedNoLintLinter string
|
2019-10-13 17:40:51 +03:00
|
|
|
}
|