How to run the maven checkstyle plugin using incremental code only

I want to add the function of automatic code review to our application. We are currently using maven for assembly. I came across a maven checkstyle plugin, but I want it to run it only by the incremental code that is being added, and not the older one. Can I achieve this with this plugin? If yes, please indicate how to do this?

+5
source share
1 answer

The Checkstyle plugin has no idea which files are changed or new. The only way to gradually add a checkstyle to the project will involve configuration, manually placing new files / packages, etc. This is a comma-separated list of patterns.

<executions> <execution> <id>checkstyle-verify</id> <phase>verify</phase> <goals> <goal>check</goal> </goals> <configuration> <includes>NewClass.java,AnotherClass.java</includes> </configuration> </execution> </executions> 
0
source

Source: https://habr.com/ru/post/1239136/


All Articles