modtidy

command
v0.116.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: BSD-3-Clause Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command modtidy refuses a push from a clone where one of the go.mod files is not tidy, however deep it sits.

⛔ `go mod tidy` AT THE ROOT DOES NOT DESCEND INTO A DIRECTORY THAT HAS ITS OWN go.mod. Three recorded occurrences (memory a-repository-can-hold-two-modules): go-widgets/toolkit twice (the rougelex/ sub-module), and go-numerics/integrate#34 on 2026-11-14 (bench/ is its own module). Each time the root was tidied and tested, green, and the CI went red with "updates to go.mod needed". The note existed; re-reading it was not part of the gesture, so the check runs instead.

Every go.mod under the directory is checked with `go mod tidy -diff`, GOTOOLCHAIN=local and GOWORK=off: the CI's constraint. With the default GOTOOLCHAIN=auto a local run fetches whatever toolchain the directive asks for and hides the problem; a go.work file would let a sibling module satisfy a requirement the CI does not see.

⛔ A MODULE THAT COULD NOT BE READ IS NEVER REPORTED CLEAN. The command failing for any reason other than "there is a diff" (a missing toolchain, a broken go.mod, no network) is UNREAD, and UNREAD outranks untidy.

Exit status: 0 every module is tidy, 1 a module is untidy, 2 a module could not be read (or no module was found).

Jump to

Keyboard shortcuts

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