seqerror

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package seqerror defines an Analyzer that checks the error value from iter.Seq2[T, error] range statements is not discarded or left unchecked.

Analyzer seqerror

seqerror: check error from iter.Seq2 range is not discarded

When ranging over an iter.Seq2[T, error], the error must be checked (typically via an if err != nil block with a scope-exiting statement) or propagated (passed to a yield function or other call). Discarding the error with a blank identifier or omitting it entirely is reported unless suppressed with a //seq:err-checked comment.

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name:     "seqerror",
	Doc:      "check error from iter.Seq2 range is not discarded",
	Run:      run,
	Requires: []*analysis.Analyzer{inspect.Analyzer},
}

Functions

This section is empty.

Types

This section is empty.

Source Files

  • analyzer.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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