Documentation
¶
Overview ¶
Command codecheck checks that the core imports nothing above it, that the map's side never imports the engine's, and that every package stays within its size budget and has a doc comment stating its promise. It also checks that no package outside internal/state writes the engine's tables (a string literal holding SQL that inserts into, updates or deletes from one). It also checks that nothing outside the git adapter (internal/vcs/git) runs git: a non-test file calling exec.Command or exec.CommandContext with the literal program "git" is reported. It also checks that a non-test file on the map's side never makes a fresh context with context.Background or context.TODO: the command's context comes down. It also checks that no test file assigns a package variable of a non-test file, its own package's or another package's of the module through its import: a test passes its fake in instead of swapping one. It also checks that nothing imports, and nothing lives at, a package code-first init removed (removedPackages), test files included, and that no non-test file under internal/ reads the process's working directory or environment itself, with os.Getwd, os.Getenv, os.LookupEnv, os.Environ, os.UserHomeDir, os.UserConfigDir, os.UserCacheDir or os.ExpandEnv: the command reads them once and passes them down. procAllowlist names each exception and why. It also checks that a package taking the port vcs.Repo uses four or more of its methods (tools/codecheck/repouse): one that uses fewer declares its own small interface. repoAllowlist names each exception and why.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package repouse reports the packages that take the port vcs.Repo whole and use three of its methods or fewer: such a package declares its own small interface of the methods it uses, as internal/evidence does, and takes that.
|
Package repouse reports the packages that take the port vcs.Repo whole and use three of its methods or fewer: such a package declares its own small interface of the methods it uses, as internal/evidence does, and takes that. |