Git Product home page Git Product logo

codecoroner's People

Contributors

3rf avatar bryant1410 avatar gwatts avatar kalbasit avatar sethwklein avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

codecoroner's Issues

Build error

There's a build error when you try to compile the app:

 โœ— go get github.com/3rf/go-unused-funcs
# github.com/3rf/go-unused-funcs/unused
/goprojects/src/github.com/3rf/go-unused-funcs/unused/unused_func_finder.go:91: cannot use serialRes.Callgraph (type []"golang.org/x/tools/oracle/serial".CallGraph) as type []"code.google.com/p/go.tools/oracle/serial".CallGraph in assignment

Script friendly exit codes

When using codecoroner it would be useful to use exit code to detect any errors instead of parsing stdout/stderr.

Suggesting to add a non zero exit code if codecoroner found any unused objects.

Build error

anacrolix@Matts-MBP-2:~$ go get -u github.com/3rf/codecoroner
# github.com/3rf/codecoroner/unused
gopath/src/github.com/3rf/codecoroner/unused/funcs.go:89: cannot use pkgs (type []*ssa.Package) as type *ssa.Package in argument to prog.CreateTestMainPackage
gopath/src/github.com/3rf/codecoroner/unused/funcs.go:89: invalid use of ... in call to prog.CreateTestMainPackage
anacrolix@Matts-MBP-2:~$ go version
go version devel +b00b214 Tue Dec 13 03:21:00 2016 +0000 darwin/amd64

Does not compile on Golang 1.5 and 1.6

go get github.com/3rf/codecoroner

github.com/3rf/codecoroner/unused

work/src/github.com/3rf/codecoroner/unused/idents.go:56: impossible type switch case: kind (type "go/types".Object) cannot have dynamic type *"golang.org/x/tools/go/types".Func (wrong type for Parent method)
have Parent() *"golang.org/x/tools/go/types".Scope
want Parent() *"go/types".Scope
work/src/github.com/3rf/codecoroner/unused/idents.go:79: impossible type switch case: kind (type "go/types".Object) cannot have dynamic type *"golang.org/x/tools/go/types".Func (wrong type for Parent method)
have Parent() *"golang.org/x/tools/go/types".Scope
want Parent() *"go/types".Scope

False positive: ignore unused method receiver

For style consistency a method receiver variable might be defined for all methods of a type even for methods where the receiver is not used.
Signaling unused method receivers variables pollutes the output.

Related: #21

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.