File tree Expand file tree Collapse file tree 2 files changed +25
-24
lines changed Expand file tree Collapse file tree 2 files changed +25
-24
lines changed Original file line number Diff line number Diff line change 77 "runtime/debug"
88
99 "golang.org/x/tools/go/analysis"
10- "golang.org/x/tools/go/packages"
1110
1211 "github.com/golangci/golangci-lint/internal/errorutil"
1312)
@@ -33,29 +32,6 @@ func (actAlloc *actionAllocator) alloc() *action {
3332 return act
3433}
3534
36- // An action represents one unit of analysis work: the application of
37- // one analysis to one package. Actions form a DAG, both within a
38- // package (as different analyzers are applied, either in sequence or
39- // parallel), and across packages (as dependencies are analyzed).
40- type action struct {
41- a * analysis.Analyzer
42- pkg * packages.Package
43- pass * analysis.Pass
44- deps []* action
45- objectFacts map [objectFactKey ]analysis.Fact
46- packageFacts map [packageFactKey ]analysis.Fact
47- result any
48- diagnostics []analysis.Diagnostic
49- err error
50- r * runner
51- analysisDoneCh chan struct {}
52- loadCachedFactsDone bool
53- loadCachedFactsOk bool
54- isroot bool
55- isInitialPkg bool
56- needAnalyzeSource bool
57- }
58-
5935func (act * action ) waitUntilDependingAnalyzersWorked () {
6036 for _ , dep := range act .deps {
6137 if dep .pkg == act .pkg {
Original file line number Diff line number Diff line change @@ -17,10 +17,35 @@ import (
1717 "time"
1818
1919 "golang.org/x/tools/go/analysis"
20+ "golang.org/x/tools/go/packages"
2021
2122 "github.com/golangci/golangci-lint/pkg/goanalysis/pkgerrors"
2223)
2324
25+ // NOTE(ldez) altered: custom fields; remove 'once' and 'duration'.
26+ // An action represents one unit of analysis work: the application of
27+ // one analysis to one package. Actions form a DAG, both within a
28+ // package (as different analyzers are applied, either in sequence or
29+ // parallel), and across packages (as dependencies are analyzed).
30+ type action struct {
31+ a * analysis.Analyzer
32+ pkg * packages.Package
33+ pass * analysis.Pass
34+ deps []* action
35+ objectFacts map [objectFactKey ]analysis.Fact
36+ packageFacts map [packageFactKey ]analysis.Fact
37+ result any
38+ diagnostics []analysis.Diagnostic
39+ err error
40+ r * runner
41+ analysisDoneCh chan struct {}
42+ loadCachedFactsDone bool
43+ loadCachedFactsOk bool
44+ isroot bool
45+ isInitialPkg bool
46+ needAnalyzeSource bool
47+ }
48+
2449// NOTE(ldez) no alteration.
2550type objectFactKey struct {
2651 obj types.Object
You can’t perform that action at this time.
0 commit comments