efc

package module
v0.0.0-...-d4f82a2 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2019 License: MIT Imports: 6 Imported by: 0

README

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)

Documentation

Index

Constants

View Source
const Doc = `` /* 195-byte string literal not displayed */

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name: "efc",
	Doc:  Doc,
	Run:  run,
	Requires: []*analysis.Analyzer{
		inspect.Analyzer,
	},
}

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
efc

Jump to

Keyboard shortcuts

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