1
0

Update and fix staticcheck

This commit is contained in:
kolaente
2020-05-29 22:15:21 +02:00
parent aae1bc3cab
commit a525787ab7
100 changed files with 12353 additions and 7912 deletions

View File

@ -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)
}
}