Git Product home page Git Product logo

gettercheck's Introduction

gettercheck

gettercheck is a program for checking for unused getters in Golang programs.

Install

go get -u github.com/saiskee/gettercheck

gettercheck requires Go 1.12 or newer.

Use

For basic usage, just give the package path of interest as the first argument:

gettercheck github.com/saiskee/gettercheck/testdata

To check all packages beneath the current directory:

gettercheck ./...

Or check all packages in your $GOPATH and $GOROOT:

gettercheck all

gettercheck also recognizes the following command-line options:

-ignoregenerated: This will ignore any files that are generated, e.g. any files that have a line that matches the regex ^//\s+Code generated.*DO NOT EDIT\.$.

-ignoretests: This will ignore any test files, or any files that end with _test.go.

-verbose: Will print a more verbose message on unused getters that are found. This will include the source file of the unused getter.

go/analysis

The package provides Analyzer instance that can be used with go/analysis API.

Just as the API itself, the analyzer is exprimental and may change in the future.

Exit Codes

gettercheck returns 1 if any problems were found in the checked files. It returns 2 if there were any other failures.

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.