gettercheck

command module
v0.0.0-...-38443d0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2021 License: MIT Imports: 10 Imported by: 0

README

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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package gettercheck is the library used to implement the gettercheck command-line tool.
Package gettercheck is the library used to implement the gettercheck command-line tool.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL