bradleyfalzon / apicompat

apicompat checks recent changes to a Go project for backwards incompatible changes
https://abicheck.bradleyf.id.au
MIT License
179 stars 5 forks source link

Exit code when there is breaking changes? #34

Closed ahmetb closed 7 years ago

ahmetb commented 7 years ago

It looks like apicompat currently returns exit code 0 when there is a breaking change:

$ apicompat -before master -after HEAD; echo $?
master:intersect.go:72: breaking change declaration removed
    func (q Query) IntersectByT(q2 Query, selectorFn interface{}) Query

0

Is this by design? Making it exit with non-zero code would help the CI scripts which make use of exit codes a great deal.

Also it looks like there's an empty line (\n\n) at the end of the command (before 0). Is that also by design?

bradleyfalzon commented 7 years ago

Thanks for the report @ahmetalpbalkan, you're right on both accounts, I would like a unique exit status for breaking changes (as opposed to other internal errors), and the extra newline has been removed (I haven't done it in the best way, but it's fine enough).

Please review #36 when you have a moment and let me know your thoughts.