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).