A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/gordonklaus/ineffassign below:

gordonklaus/ineffassign: Detect ineffectual assignments in Go code.

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.

go install github.com/gordonklaus/ineffassign@latest

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

Which will analyze all packages beneath the current directory.

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4