My team has Idea codestyle and inspections configs exported to share with each other. We have an agreement to have no idea warnings before commit. But we don't have ability to check it at CI side (we use Bitbucket now)
It would be nice to have a maven plugin that will validate the code according to Idea config (in xml) and fail the build if there are errors. Or even two plugins - one for codestyle, other for inspections.
But I can't find any. How to address this?
There are three most popular options:
maven-checkstyle-plugin- generates a report regarding the code style used by the developers. It will do what you want, though you will need a bit of time to adjust checkstyle.xml configuration to what you have in your team
spotbugs-maven-plugin- Spotbugs is a successor of FindBugs (which is no longer maintaned) and this would answer your inspection needs
maven-pmd-plugin- PMD is another popular choice for inspection, from its documentation:
Other options include for example Google's Error Prone but the ones I provided are most mature.