9

I want to add auto code review feature to our application. Currently we use maven to do builds. I came across maven checkstyle plugin but want this to run it only on incremental code that gets added and not on older one. Can i achieve this using this plugin? If yes then please provide pointers on how to do it?

Pushkin
  • 524
  • 4
  • 16

1 Answers1

4

Checkstyle plugin has no idea what files are modified or new. The only way of incrementally adding checkstyle to a project would be using includes configuration, manually putting new files/packages etc. It's 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>
Oleg Mikheev
  • 17,186
  • 14
  • 73
  • 95