Hi ZK Devs,

I am working on ZOOKEEPER-3973 and I noticed the existing Travis CI
job executes `checkstyle:check` on the command line. I checked the
pom.xml files and there is an execution defined in the
`<pluginManagement/>` section of the main pom.xml and another one in
the zookeeper-contrib/pom.xml. However, neither of these are actually
activated, as there is no corresponding execution
`maven-checkstyle-plugin` defined in a `<build><plugins/></build>`
section, only in the `<pluginManagement/>` section.

So, my question is: what is the intent here?

1. Should checkstyle always run during a build, unless skipped with
`-Dcheckstyle.skip` on the command-line?

OR

2. Should checkstyle always run *only* when explicitly run by placing
`checkstyle:check` on the command-line?


If the answer is 1., then the pom.xml files are missing a
maven-checkstyle-plugin entry in the `<build><plugins/></build>`
section and should be added.
If the answer is 2., then the `<executions/>` block of the
maven-checkstyle-plugin entry in the `<pluginManagement/>` section is
doing nothing and should be removed.

Once I know the answer, I can include the change as part of
ZOOKEEPER-3973, so that way the GitHub Actions CI job I am creating
for that JIRA is configured to run checkstyle in whatever way the
project wants, without unnecessary configuration.

Thanks,
Christopher

Reply via email to