deferlint

package module
v0.0.0-...-7d03130 Latest Latest
Warning

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

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

README

deferlint

This package warns when defer is used within loops.

Example

$ go get github.com/eatonphil/deferlint
$ go vet -vettool=/Users/philipeaton/go/bin/deferlint ./tests
# github.com/eatonphil/deferlint/tests
tests/deferloop.go:7:3: defer in loop found "defer f()"

References

https://github.com/fatih/addlint

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:     "deferlint",
	Doc:      "reports defer in loops",
	Requires: []*analysis.Analyzer{inspect.Analyzer},
	Run:      run,
}

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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