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.
Click to show internal directories.
Click to hide internal directories.