Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #11759

Merged
merged 1 commit into from
Dec 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ $(GLOCK):

# Update the git hooks and run the bootstrap script whenever any
# of them (or their dependencies) change.
.bootstrap: $(GITHOOKS) $(GLOCK) GLOCKFILE
.bootstrap: $(GITHOOKS) $(GLOCK) GLOCKFILE glide.lock
git submodule update --init
@unset GIT_WORK_TREE; $(GLOCK) sync -n < GLOCKFILE
touch $@
Expand Down
55 changes: 30 additions & 25 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ import:
subpackages:
- exp
- package: github.com/rubyist/circuitbreaker
- package: github.com/sasha-s/go-deadlock
- package: github.com/tamird/go-deadlock
version: 9c489b49f3dd3c305f29801b10d84407ffa71971
- package: github.com/satori/go.uuid
- package: github.com/spf13/cobra
subpackages:
Expand Down
43 changes: 33 additions & 10 deletions pkg/cmd/metacheck/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package main

import (
"log"
"os"

"honnef.co/go/lint"
Expand All @@ -26,17 +27,39 @@ import (
"honnef.co/go/unused"
)

func main() {
checker := unused.NewChecker(unused.CheckAll)
checker.WholeProgram = true
funcs := map[string]lint.Func{
"U1000": unused.NewLintRunner(checker),
type metaChecker struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are all these changes? Care to explain in the commit message?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checkers []lint.Checker
}

func (m *metaChecker) Init(program *lint.Program) {
for _, checker := range m.checkers {
checker.Init(program)
}
for n, f := range staticcheck.Funcs {
funcs[n] = f
}

func (m *metaChecker) Funcs() map[string]lint.Func {
funcs := make(map[string]lint.Func)
for _, checker := range m.checkers {
for k, v := range checker.Funcs() {
if _, ok := funcs[k]; ok {
log.Fatalf("duplicate lint function %s", k)
} else {
funcs[k] = v
}
}
}
for n, f := range simple.Funcs {
funcs[n] = f
return funcs
}

func main() {