Documentation ¶
Overview ¶
gobreaking reports breaking changes in a Git repository.
Below is the exhaustive list of changes that are considered breaking. It applies exclusively to exposed names.
- Removing a name (constant, type, variable, function).
- Changing the kind of a name.
- Adding or removing a method in an interface.
- Adding or removing a parameter in a function or interface.
- Changing the type of a parameter or result in a function or interface.
- Adding or removing a result in a function or interface.
- Changing the type of an exported struct field.
- Removing an exported field from a struct.
- Adding an unexported field to a struct containing only exported fields.
- Adding an exported field before the last field of a struct containing only exported fields.
- Repositioning a field in a struct containing only exported fields.
gobreaking can be invoked two ways:
By providing one argument treeish: it reports the breaking changes between treeish and the working directory.
By providing two arguments treeish1 and treeish2: it reports the breaking changes between treeish1 and treeish2.
The exit code of gobreaking is 2 for erroneous invocation, 1 if a breaking change was reported, and 0 otherwise.
Click to show internal directories.
Click to hide internal directories.