Sneak preview: refactor error/warning reporting

Using the PR validator to check I didn't break sbt/IDE. Feedback welcome, but I'll probably hold off a bit on this.