testcheck

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(w io.Writer, dir string, opts Options) error

Run performs the test check on the given directory.

Types

type Options

type Options struct {
	JSON    bool // Output as JSON
	ShowAll bool // Show all packages (default shows only missing)
	Summary bool // Show only summary
	Verbose bool // Show test file names
}

Options configure the testcheck behavior.

type PackageStatus

type PackageStatus struct {
	Name      string   `json:"name"`
	Path      string   `json:"path"`
	HasTests  bool     `json:"has_tests"`
	TestFiles []string `json:"test_files,omitempty"`
	GoFiles   int      `json:"go_files"`
}

PackageStatus represents the test status of a package.

type Result

type Result struct {
	Total     int             `json:"total"`
	WithTests int             `json:"with_tests"`
	NoTests   int             `json:"no_tests"`
	Coverage  float64         `json:"coverage_percent"`
	Packages  []PackageStatus `json:"packages"`
}

Result holds the overall test check results.

func Check

func Check(dir string) (*Result, error)

Check scans the directory and returns test status for all packages.

Jump to

Keyboard shortcuts

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