Skip to content

zimmski/lint-naked-returns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

lint-naked-returns

This program finds you naked returns in functions and methods with return arguments in Go(Golang) source code.

Installation

go get -u github.com/zimmski/lint-naked-returns

Example

This function's return statement will be flagged.

func foo() (hey string) {
	return
}

Usage

Search current package:

lint-naked-returns

Search the package github.com/zimmski/tavor and its subpackages:

lint-naked-returns github.com/zimmski/tavor/...

Search the package github.com/zimmski/tavor and its subpackages using the build tag example-main:

lint-naked-returns --tag example-main github.com/zimmski/tavor/...

Show the program's help:

lint-naked-returns --help

About

Find naked returns in function and methods with named return arguments

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages