Skip to content

Commit d88ac1a

Browse files
committed
chore: isolate code from x/tools
1 parent 62e0536 commit d88ac1a

File tree

3 files changed

+19
-21
lines changed

3 files changed

+19
-21
lines changed

pkg/goanalysis/runner_action.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ type action struct {
5656
needAnalyzeSource bool
5757
}
5858

59-
func (act *action) String() string {
60-
return fmt.Sprintf("%s@%s", act.a, act.pkg)
61-
}
62-
6359
func (act *action) waitUntilDependingAnalyzersWorked() {
6460
for _, dep := range act.deps {
6561
if dep.pkg == act.pkg {

pkg/goanalysis/runner_base.go

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,28 @@ import (
1616
"reflect"
1717
"time"
1818

19-
"github.com/golangci/golangci-lint/pkg/goanalysis/pkgerrors"
2019
"golang.org/x/tools/go/analysis"
20+
21+
"github.com/golangci/golangci-lint/pkg/goanalysis/pkgerrors"
2122
)
2223

24+
// NOTE(ldez) no alteration.
25+
type objectFactKey struct {
26+
obj types.Object
27+
typ reflect.Type
28+
}
29+
30+
// NOTE(ldez) no alteration.
31+
type packageFactKey struct {
32+
pkg *types.Package
33+
typ reflect.Type
34+
}
35+
36+
// NOTE(ldez) no alteration.
37+
func (act *action) String() string {
38+
return fmt.Sprintf("%s@%s", act.a, act.pkg)
39+
}
40+
2341
// NOTE(ldez) altered version of `func (act *action) execOnce()`.
2442
func (act *action) analyze() {
2543
defer close(act.analysisDoneCh) // unblock actions depending on this action

pkg/goanalysis/runner_facts.go

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)