scratchdir

package
v0.87.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package scratchdir checks the naming contract the blueprint gate tests rely on: a scratch package they generate inside the repo module must stay invisible to `go list ./...` and `go build ./...` while it exists.

The gates create the directory and fill it a moment later. A `./...` expansion in another test binary during that window used to fail with "no Go files in examples/<name>/<scratch>". Go's tooling skips any directory whose name begins with "_" or ".", so the gates name their scratch directories with a leading underscore. Renaming one without it reopens the window, and nothing else would notice until a parallel run flaked.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertHiddenFromGoList

func AssertHiddenFromGoList(t testing.TB, parent, name string)

AssertHiddenFromGoList writes a Go package under parent/name, runs `go list ./...` in parent, and fails t if the package shows up. It removes its probe, and parent/name too when it created that directory and nothing else has written there since.

Types

This section is empty.

Jump to

Keyboard shortcuts

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