Implement Tycho warnings as custom check-style rules
Currently Tycho emits different warnings during the build in different areas:
- Encoding warnings
- Target platform warnings
- P2 warnings
- ...
Some of them might or might not be always useful. Instead of Tycho decide what should be shown to the user, we might turn all these into custom checkstyle checks:
https://maven.apache.org/plugins/maven-checkstyle-plugin/examples/custom-developed-checkstyle.html
that way it would be possibly to control them and reuse tools that already process check-style formated files.
I use checkstyle a lot. Still, I'm not sure if that is the best way to make the warnings optional. Probably only a minority of Tycho projects use checkstyle by now. However, all of them use Maven. Therefore writing custom maven enforcer rules would surely have a bigger "market": https://maven.apache.org/enforcer/enforcer-api/writing-a-custom-rule.html
I have not yet implemented Java based warnings for either of them, so I cannot compare the 2 approaches by implementation difficulty.
@Bananeweizen That also seems an interesting idea. Neverless these are both "just" plugins that one needs to enable.
But I can even think about a rule "don't use restricted API", or "don't use require bundle" so maybe this can be beyond what Tycho currently offers as well!