Documentation
¶
Index ¶
- func FindOriginalStartLine(diff []byte) int64
- func ParseAndTypeCheckFile(file string, collectors []filter.NodeCollector) (*ast.File, *token.FileSet, *types.Package, *types.Info, error)
- func ParseDiffOutput(diff string) []int64
- func ParseFile(file string) (*ast.File, *token.FileSet, error)
- func ParseSource(data interface{}) (*ast.File, *token.FileSet, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindOriginalStartLine ¶
FindOriginalStartLine attempts to find the original line number where a mutation occurred.
func ParseAndTypeCheckFile ¶
func ParseAndTypeCheckFile(file string, collectors []filter.NodeCollector) (*ast.File, *token.FileSet, *types.Package, *types.Info, error)
ParseAndTypeCheckFile parses and type-checks the given file, and returns everything interesting about the file. If a fatal error is encountered the error return argument is not nil.
func ParseDiffOutput ¶
ParseDiffOutput parses the unified diff (-u) output to extract the line numbers where changes occurred. The `-u` flag provides exactly 3 lines of context around changes, so the actual changed line can be derived by adjusting the reported line number from the diff header.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.