Update and fix staticcheck
This commit is contained in:
18
vendor/honnef.co/go/tools/lint/stats.go
vendored
18
vendor/honnef.co/go/tools/lint/stats.go
vendored
@ -1,5 +1,11 @@
|
||||
package lint
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"golang.org/x/tools/go/analysis"
|
||||
)
|
||||
|
||||
const (
|
||||
StateInitializing = 0
|
||||
StateGraph = 1
|
||||
@ -17,4 +23,16 @@ type Stats struct {
|
||||
Problems uint32
|
||||
ActiveWorkers uint32
|
||||
TotalWorkers uint32
|
||||
PrintAnalyzerMeasurement func(*analysis.Analyzer, *Package, time.Duration)
|
||||
}
|
||||
|
||||
type AnalysisMeasurementKey struct {
|
||||
Analysis string
|
||||
Pkg string
|
||||
}
|
||||
|
||||
func (s *Stats) MeasureAnalyzer(analysis *analysis.Analyzer, pkg *Package, d time.Duration) {
|
||||
if s.PrintAnalyzerMeasurement != nil {
|
||||
s.PrintAnalyzerMeasurement(analysis, pkg, d)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user