Documentation
¶
Overview ¶
Package nogit defines an Analyzer that reports sbnn shelling out to git.
sbnn never runs git. A diff reaches it on stdin and nowhere else, which is what lets it review a diff no working tree can produce any more - one pasted out of a mail, one built by another tool, one whose repository is not on this machine. The rule is written down in AGENTS.md, and a single exec.Command("git", ...) added in passing would quietly undo it, so it is checked here rather than left to review.
Test files are exempt. The rule constrains the binary sbnn ships, and a _test.go file is not part of it; a test that asks git what the repository tracks - version/release_test.go does, to prove no .tsbuildinfo is committed - is making a statement about the checkout, not reviewing a diff.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Analyzer = &analysis.Analyzer{ Name: "nogit", Doc: doc, Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: run, }
Analyzer reports calls that run the git binary.
Functions ¶
This section is empty.
Types ¶
This section is empty.