Skip to content
Linter for errors.Is and errors.As
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd/erris Cleanup Dec 3, 2019
internal/visitor
.travis.yml Initial commit Nov 26, 2019
LICENSE Initial commit Nov 26, 2019
README.md
erris.go repackage as analysis.Analyzer Dec 3, 2019
go.mod
go.sum

README.md

erris

erris is a program for checking that errors are compared or type asserted using go1.13 errors.Is and errors.As functions.

Build Status Report

Install

go get -u github.com/romanyx/erris/cmd/erris

Use

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

erris github.com/romanyx/erris/testdata

Outputs:

github.com/romanyx/erris/testdata/main.go:14:5:	use errors.Is to compare an error
github.com/romanyx/erris/testdata/main_test.go:11:14:	use errors.As to type assert an error

To check all packages beneath the current directory:

erris ./...
You can’t perform that action at this time.