ineffassign

command module
Version: v0.0.0-...-4cc7213 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: MIT Imports: 13 Imported by: 0

README

ineffassign

Detect ineffectual assignments in Go code. An assignment is ineffectual if the variable assigned is not thereafter used.

This tool misses some cases because it does not consider any type information in its analysis. For example, assignments to struct fields are never marked as ineffectual. It should, however, never give any false positives.

Install

go get -u github.com/gordonklaus/ineffassign

Usage

For basic usage, run the following command from the root of your project:

ineffassign ./...

Which will analyze all packages beneath the current directory.

Exit Codes

ineffassign returns 1 if any problems were found in the checked files. It returns 3 if there were any invalid arguments.

Documentation

The Go Gopher

There is no documentation for this package.

Source Files

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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