Categorygithub.com/gostaticanalysis/debugcode
modulepackage
0.1.1
Repository: https://github.com/gostaticanalysis/debugcode.git
Documentation: pkg.go.dev

# README

debugcode

pkg.go.dev

debugcode finds debug codes.

  • builtinprint: finds calling builtin print or println.
  • commentout: finds a commented out debug code without reason

Install

You can get debugcode by go install command (Go 1.16 and higher).

$ go install github.com/gostaticanalysis/debugcode@latest

How to use

debugcode run with go vet as below when Go is 1.12 and higher.

$ go vet -vettool=$(which debugcode) ./...

Analyzers

builtinprint

See: https://github.com/gostaticanalysis/builtinprint

commentout

commentout: finds a commented out debug code without reason.

package a

//func f() { // want "do not leave a commented out debug code without reason"
//	panic("not implement")
//}

// with reason // OK
//func f() {
//	panic("not implement")
//}

Analyze with golang.org/x/tools/go/analysis

You can get analyzers of debugcode from debugcode.Analyzers. And you can use them with unitchecker.

# Packages

No description provided by the author
No description provided by the author