bradleyfalzon / gopherci

GopherCI was a project to help you maintain high-quality Go projects, by checking each GitHub Pull Request, for backward incompatible changes, and a suite of other third party static analysis tools.
https://gopherci.io
BSD 2-Clause "Simplified" License
102 stars 13 forks source link

Handle new issues on unaffected lines #99

Open bradleyfalzon opened 7 years ago

bradleyfalzon commented 7 years ago

Some tools can raise issues on lines that haven't been changed, but a change elsewhere has caused them to error.

For such cases, it may be better to run the tool on the old commit, as well as the new commit and the complement will be the list of issues found.

GopherCI would then need handle commenting on lines of code that haven't changed, so an inline comment may not be possible. It may be just a matter of still failing the build, and having the analysis page show the issue but not on the patch, just the summary of issues per tool.

It may be possible then assign a tool as requiring complement filter (instead of revgrep filter), which would run those tools in a different way (checking out old ref, running tool, checking out new ref, returning the complement).