erris

package module
Version: v0.0.0-...-81403d0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: MIT Imports: 3 Imported by: 0

README

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 ./...

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:             "erris",
	Doc:              `checks that errors are compared or type asserted using errors.Is and errors.As`,
	Run:              run,
	RunDespiteErrors: true,
}

Analyzer is an golang.org/x/tools/go/analysis compatible interface.

Functions

This section is empty.

Types

This section is empty.

Source Files

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL