nogit

package
v0.0.0-...-285f162 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 9 Imported by: 0

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

View Source
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.

Jump to

Keyboard shortcuts

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