GitHub user zentol opened a pull request:
https://github.com/apache/flink/pull/4112
[FLINK-6901] Flip checkstyle configuration files
This PR makes the `strict-checkstyle.xml` the default checkstyle
configuration.
As a first step i made `flink-streaming-scala` checkstyle compliant
(FLINK-6902), because it required few changes and i didn't want to add an
exclusion only to remove it again tomorrow.
Making the strict checkstyle the default required a few more changes than i
expected. As it stands it is not possible to execute the checkstyle plugin
twice in a single build with different configurations. This also implies that
currently many parts of `flink-runtime` aren't even covered by the lenient
checkstyle.
So we need a way to both check the lenient for all files, and the strict
for a subset in a single run. Given that the strict checkstyle is an extension
of the lenient one i instead opted for creating suppression files for each of
the non-covered modules, disabling all the new checks added by the strict
checkstyle. This didn't work out completely as it still required resolving 2
violations in `flink-core`, but that's ok i guess.
The suppression files are pretty ugly as they consist of a giant regex
checking for every module in a single line, and the same for packages in
flink-runtime, but i couldn't find a better solution. Spreading the regex over
multiple-lines frustratingly enough doesn't work.
One could resolve this somewhat for flink-runtime by adding a separate
suppression for every package, but you would still retain the endless rules
regex.
Note that this change implies that every new module is now covered by the
strict checkstyle.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zentol/flink 6901
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/4112.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #4112
----
commit 007ef6d66835626bebec2499d9b23ba1d829264f
Author: zentol <[email protected]>
Date: 2017-06-12T15:40:21Z
[FLINK-6902] Activate strict checkstyle for flink-streaming-scala
commit 0c89dd3b3df44ed8fda93bf5eb9dbfb2aa7dc28c
Author: zentol <[email protected]>
Date: 2017-06-12T15:44:51Z
[FLINK-6901] Remove plugins using strict-checkstyle.xml
commit 8887e6cb407f92388937cec16172c6840637c3be
Author: zentol <[email protected]>
Date: 2017-06-12T15:45:45Z
[FLINK-6901] Rework exclusions
commit edf048734edb1d0d36a92a082d228207bc5ddbf3
Author: zentol <[email protected]>
Date: 2017-06-12T15:46:16Z
[FLINK-6901] Replace lenient checkstyle
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---