> CI probably is the anwser, made a utility based on
golang.org/x/mod which parses go.mod and checks if replaces are there and exit with error state if they are.
This isn't the problem discussed in 26640 at least. There, the issue
is that it is not currently possible to have a go.mod.local file
_outside_ of source control that augments the real go.mod.
Your suggestion is covered by the gorelease tool
(
https://pkg.go.dev/golang.org/x/exp/cmd/gorelease)