-
Notifications
You must be signed in to change notification settings - Fork 1k
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
omg. it's like zombies rising from the dead!
just one thing, then yes, this seems like it'd be good - generally very few false positives from this kind of analysis.
internal/gps/selection.go
Outdated
// Compute a list of the unique packages within the given ProjectIdentifier that | ||
// are currently selected, and the number of times each package has been | ||
// independently selected. | ||
func (s *selection) getSelectedPackagesIn(id ProjectIdentifier) map[string]int { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's mark an exception for this one in the linter - it's helpful to keep around for future solver plans, especially because it reflects a performance problem we'll run into when we do try to use it.
Done!
…On Mon, Sep 11, 2017 at 4:17 PM, sam boyer ***@***.***> wrote:
***@***.**** requested changes on this pull request.
omg. it's like zombies rising from the dead!
just one thing, then yes, this seems like it'd be good - generally very
few false positives from this kind of analysis.
------------------------------
In internal/gps/selection.go
<#1157 (comment)>:
> @@ -93,25 +89,6 @@ func (s *selection) getRequiredPackagesIn(id ProjectIdentifier) map[string]int {
return uniq
}
-// Compute a list of the unique packages within the given ProjectIdentifier that
-// are currently selected, and the number of times each package has been
-// independently selected.
-func (s *selection) getSelectedPackagesIn(id ProjectIdentifier) map[string]int {
let's mark an exception for this one in the linter - it's helpful to keep
around for future solver plans, especially because it reflects a
performance problem we'll run into when we do try to use it.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1157 (review)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABdsPIoWDCkHSWcooJJh-dsJbcMsa-Vtks5shZVPgaJpZM4PToDX>
.
|
.travis.yml
Outdated
@@ -7,7 +7,7 @@ jobs: | |||
- stage: test | |||
go_import_path: github.com/golang/dep | |||
install: | |||
- go get -u honnef.co/go/tools/cmd/{gosimple,staticcheck} | |||
- go get -u honnef.co/go/tools/cmd/{gosimple,staticcheck,unused} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like running them together as megacheck could be faster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Temporary() bool | ||
}); ok { | ||
}); ok && t.Temporary() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matjam is this right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure the old code was wrong; it's not enough to assert on the type, you gotta call the method. https://godoc.org/net#Error
cmd/dep/ensure.go:138:2: field overrides is unused (U1000) cmd/dep/ensure.go:702:6: type stringSlice is unused (U1000) internal/gps/bridge.go:60:2: field crp is unused (U1000) internal/gps/pkgtree/pkgtree_test.go:36:3: field Internal is unused (U1000) internal/gps/pkgtree/pkgtree_test.go:36:13: field External is unused (U1000) internal/gps/selection.go:76:21: func (*selection).setDependenciesOn is unused (U1000) internal/gps/selection.go:99:21: func (*selection).getSelectedPackagesIn is unused (U1000) internal/gps/solve_basic_test.go:1356:33: func (*depspecSourceManager).ExternalReach is unused (U1000) internal/gps/solve_basic_test.go:1571:16: func fixLock.SolverVersion is unused (U1000) internal/gps/solve_basic_test.go:1588:18: func dummyLock.SolverVersion is unused (U1000) internal/gps/solve_failures.go:20:2: const warning is unused (U1000) internal/gps/solve_failures.go:21:2: const mustResolve is unused (U1000) internal/gps/solve_failures.go:22:2: const cannotResolve is unused (U1000) internal/gps/source_manager.go:217:4: func Temporary is unused (U1000) internal/gps/source_manager.go:712:2: const ctCheckoutVersion is unused (U1000) internal/gps/typed_radix.go:34:23: func (*deducerTrie).Delete is unused (U1000) internal/gps/vcs_repo.go:201:6: type svnRepo is unused (U1000) internal/gps/vcs_repo_test.go:122:6: func testSvnRepo is unused (U1000) internal/gps/vcs_source.go:573:6: type repo is unused (U1000) internal/gps/version_queue_test.go:30:23: func (*fakeBridge).ListVersions is unused (U1000) internal/gps/version_queue_test.go:45:27: func (*fakeFailBridge).ListVersions is unused (U1000) internal/test/integration/testproj.go:34:2: field h is unused (U1000)
/Users/tamird/src/go/src/github.com/golang/dep/context.go:86:1: exported method Ctx.SourceManager should have comment or be unexported /Users/tamird/src/go/src/github.com/golang/dep/internal/gps/cmd.go:75:13: should omit type *int32 from declaration of var isDone; it will be inferred from the right-hand side /Users/tamird/src/go/src/github.com/golang/dep/internal/gps/version.go:122:1: exported method Revision.ImpliedCaretString should have comment or be unexported /Users/tamird/src/go/src/github.com/golang/dep/internal/test/test.go:27:2: exported var ExeSuffix should have comment or be unexported /Users/tamird/src/go/src/github.com/golang/dep/internal/test/test.go:29:15: should omit type *bool from declaration of var PrintLogs; it will be inferred from the right-hand side /Users/tamird/src/go/src/github.com/golang/dep/internal/test/test.go:30:15: should omit type *bool from declaration of var UpdateGolden; it will be inferred from the right-hand side /Users/tamird/src/go/src/github.com/golang/dep/internal/test/test.go:194:1: comment on exported method Helper.Run should be of the form "Run ..." /Users/tamird/src/go/src/github.com/golang/dep/internal/test/test.go:449:1: comment on exported method Helper.GetFile should be of the form "GetFile ..." /Users/tamird/src/go/src/github.com/golang/dep/internal/test/test.go:611:1: exported method Helper.GetCommit should have comment or be unexported
lint is something we should be enforcing via codeclimate, though honestly i'm pretty consistently underimpressed with the feedback we get from them, so i'm fine with adding it back to travis. |
Cool. As with #1154, if you could merge this without squashing, I'd appreciate it. |
Green! |
What does this do / why do we need it?
Removes a bunch of dead code and fixes minor bugs.
What should your reviewer look out for in this PR?
N/A.
Do you need help or clarification on anything?
No.
Which issue(s) does this PR fix?
None that I know of.