[ 
https://issues.apache.org/jira/browse/FLINK-6901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16046721#comment-16046721
 ] 

ASF GitHub Bot commented on FLINK-6901:
---------------------------------------

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 <ches...@apache.org>
Date:   2017-06-12T15:40:21Z

    [FLINK-6902] Activate strict checkstyle for flink-streaming-scala

commit 0c89dd3b3df44ed8fda93bf5eb9dbfb2aa7dc28c
Author: zentol <ches...@apache.org>
Date:   2017-06-12T15:44:51Z

    [FLINK-6901] Remove plugins using strict-checkstyle.xml

commit 8887e6cb407f92388937cec16172c6840637c3be
Author: zentol <ches...@apache.org>
Date:   2017-06-12T15:45:45Z

    [FLINK-6901] Rework exclusions

commit edf048734edb1d0d36a92a082d228207bc5ddbf3
Author: zentol <ches...@apache.org>
Date:   2017-06-12T15:46:16Z

    [FLINK-6901] Replace lenient checkstyle

----


> Flip checkstyle configuration files
> -----------------------------------
>
>                 Key: FLINK-6901
>                 URL: https://issues.apache.org/jira/browse/FLINK-6901
>             Project: Flink
>          Issue Type: Improvement
>          Components: Checkstyle
>    Affects Versions: 1.4.0
>            Reporter: Chesnay Schepler
>            Assignee: Chesnay Schepler
>
> We currently have 2 checkstyle files, {{checkstyle.xml}} as the basic 
> version, and {{strict-checkstyle.xml}} as a heavily expanded version that is 
> applied to most existing modules (see FLINK-6698).
> [~greghogan] suggested to flip the checkstyle while reviewing this PR 
> https://github.com/apache/flink/pull/4086, given that the strict checkstyle 
> is supposed to subsume the existing checkstyle in the long-term.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to