nakedreturn

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: MIT Imports: 6 Imported by: 2

README

nakedretrun

pkg.go.dev

nakedretrun finds naked returns.

package a

func f() (n int) {
        return // want "should not use naked return"
}

fixnakedreturn command check and fix (remove) naked return.

$ go install github.com/gostaticanalysis/nakedreturn/cmd/fixnakedreturn
$ fixnakedreturn ./...

Documentation

Index

Constants

This section is empty.

Variables

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

Analyzer finds naked returns.

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