Skip to content

Instantly share code, notes, and snippets.

@steveyen
Created February 17, 2016 18:30
Show Gist options
  • Save steveyen/3f63ed1fe79b78876ff0 to your computer and use it in GitHub Desktop.
Save steveyen/3f63ed1fe79b78876ff0 to your computer and use it in GitHub Desktop.
errcheck speedbumps
Steves-MacBook-Pro:bleve steveyen$ which -a errcheck
/Users/steveyen/go/bin/errcheck
Steves-MacBook-Pro:bleve steveyen$ ls -al ~/go/bin/errcheck
-rwxr-xr-x 1 steveyen staff 6141328 Feb 16 22:22 /Users/steveyen/go/bin/errcheck
Steves-MacBook-Pro:bleve steveyen$
Steves-MacBook-Pro:bleve steveyen$ pwd
/Users/steveyen/go/src/github.com/blevesearch/bleve
Steves-MacBook-Pro:bleve steveyen$
Steves-MacBook-Pro:bleve steveyen$ errcheck
error: failed to check packages: could not parse arguments: import ".": import relative to unknown directory
Steves-MacBook-Pro:bleve steveyen$
Steves-MacBook-Pro:bleve steveyen$ errcheck ./...
error: failed to check packages: could not parse arguments: import "./.": import relative to unknown directory
Steves-MacBook-Pro:bleve steveyen$
Steves-MacBook-Pro:bleve steveyen$
Steves-MacBook-Pro:bleve steveyen$ go get github.com/kisielk/errcheck
# github.com/kisielk/errcheck/internal/errcheck
../../kisielk/errcheck/internal/errcheck/errcheck.go:234: impossible type switch case: v.pkg.Info.Types[call].Type (type "golang.org/x/tools/go/types".Type) cannot have dynamic type *"go/types".Named (wrong type for Underlying method)
have Underlying() "go/types".Type
want Underlying() "golang.org/x/tools/go/types".Type
../../kisielk/errcheck/internal/errcheck/errcheck.go:237: impossible type switch case: v.pkg.Info.Types[call].Type (type "golang.org/x/tools/go/types".Type) cannot have dynamic type *"go/types".Pointer (wrong type for Underlying method)
have Underlying() "go/types".Type
want Underlying() "golang.org/x/tools/go/types".Type
../../kisielk/errcheck/internal/errcheck/errcheck.go:240: impossible type switch case: v.pkg.Info.Types[call].Type (type "golang.org/x/tools/go/types".Type) cannot have dynamic type *"go/types".Tuple (wrong type for Underlying method)
have Underlying() "go/types".Type
want Underlying() "golang.org/x/tools/go/types".Type
../../kisielk/errcheck/internal/errcheck/errcheck.go:275: impossible type assertion:
*"go/types".Builtin does not implement "golang.org/x/tools/go/types".Object (wrong type for Parent method)
have Parent() *"go/types".Scope
want Parent() *"golang.org/x/tools/go/types".Scope
Steves-MacBook-Pro:bleve steveyen$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment