runnerdiscard

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package runnerdiscard refuses io.Discard as the Stdout or Stderr of a runner.Program, as Analyzers in contract.md defines. The runner reads such a writer through a pipe. A descendant that keeps the pipe open holds the call until the drain limit, as in 3e6a4eff. A nil writer gives the program the null device, with no pipe.

The rule reads struct literals and field assignments in production files. It skips test files, because a test can exercise a discarded pipe on purpose. It follows no variable, so `w := io.Discard` then `Stdout: w` passes.

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name: "runnerdiscard",
	Doc:  "refuse io.Discard as the Stdout or Stderr of a runner.Program",
	Run:  run,
}

Analyzer reports io.Discard in the Stdout or Stderr of a runner.Program.

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