Skip to content

Conversation

@srnagar
Copy link
Member

@srnagar srnagar commented Jul 31, 2019

  • Maven goal checkstyle:checkstyle is not inherited from the reactor parent and hence is using the default checkstyle rules for each of the child modules which means that failsOnError is false.
  • Maven goal checkstyle:checkstyle-aggregate works as expected and fails the build if any of the child modules have checkstyle errors
  • To use the parent pom's checkstyle configuration in a multi-module project like ours, we have to use maven goal site as per this documentation - https://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html

So, we have the following options:

  1. If we have to use checkstyle:checkstyle we need to duplicate the configuration in each of the child modules.
  2. We can instead use checkstyle:checkstyle-aggregate which will accomplish what we want
  3. Continue to use site:site site:stage

For the purpose of failing the PR build with minimum amount of work, we will use checkstyle:checkstyle-aggregate (option 2 above).

@srnagar srnagar merged commit f3d218a into Azure:master Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants