analyzer

package
v0.0.0-...-1b70783 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package analyzer provides the deferrlint static analysis for Go code. It checks for incorrect usage of defer statements, specifically assignments to error-typed variables that are not named return values in deferred functions.

This analyzer is useful for catching potential bugs where a deferred function attempts to assign a value to an error variable that is expected to be a named return value, but isn't. This can help ensure that deferred functions behave as intended, and that error handling is consistent and predictable.

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name: "deferrlint",
	Doc:  "reports when a deferred function assigns to an error-typed variable that is not a named return value",
	Run:  run,
	URL:  "github.com/jakobmoellerdev/deferrlint",
}

Analyzer reports when a deferred function assigns to an error-typed variable that is not a named return value.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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