Skip to content
/ efc Public

Error format checker for projects which uses pkg/errors

License

Notifications You must be signed in to change notification settings

cou929/efc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

efc

Error printing format checker.

efc reports printing format which does not use %+v directive for error type.

Intend to be applied to projects which uses pkg/errors. See also https://godoc.org/github.com/pkg/errors#hdr-Formatted_printing_of_errors

Insall

go install github.com/cou929/efc/cmd/efc

Example

package main

import "fmt"

func main() {
	var err error
	fmt.Printf("err %v", err)
}

efc reports this source like below:

$ efc -c=0 ./...
path/to/file/sample.go:7:2: should use %+v format for error type
7               fmt.Printf("err %v", err)

About

Error format checker for projects which uses pkg/errors

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages