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 7
7
"runtime/debug"
8
8
9
9
"golang.org/x/tools/go/analysis"
10
- "golang.org/x/tools/go/packages"
11
10
12
11
"github.com/golangci/golangci-lint/internal/errorutil"
13
12
)
@@ -33,29 +32,6 @@ func (actAlloc *actionAllocator) alloc() *action {
33
32
return act
34
33
}
35
34
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
-
59
35
func (act * action ) waitUntilDependingAnalyzersWorked () {
60
36
for _ , dep := range act .deps {
61
37
if dep .pkg == act .pkg {
Original file line number Diff line number Diff line change @@ -17,10 +17,35 @@ import (
17
17
"time"
18
18
19
19
"golang.org/x/tools/go/analysis"
20
+ "golang.org/x/tools/go/packages"
20
21
21
22
"github.com/golangci/golangci-lint/pkg/goanalysis/pkgerrors"
22
23
)
23
24
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
+
24
49
// NOTE(ldez) no alteration.
25
50
type objectFactKey struct {
26
51
obj types.Object
You can’t perform that action at this time.
0 commit comments