You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by dawidwys <gi...@git.apache.org> on 2017/07/14 09:26:58 UTC

[GitHub] flink pull request #4343: [FLINK-7190] Activate checkstyle flink-java/*

GitHub user dawidwys opened a pull request:

    https://github.com/apache/flink/pull/4343

    [FLINK-7190] Activate checkstyle flink-java/*

    Thanks for contributing to Apache Flink. Before you open your pull request, please take the following check list into consideration.
    If your changes take all of the items into account, feel free to open your pull request. For more information and/or questions please refer to the [How To Contribute guide](http://flink.apache.org/how-to-contribute.html).
    In addition to going through the list, please provide a meaningful description of your changes.
    
    - [ ] General
      - The pull request references the related JIRA issue ("[FLINK-XXX] Jira title text")
      - The pull request addresses only one issue
      - Each commit in the PR has a meaningful commit message (including the JIRA id)
    
    - [ ] Documentation
      - Documentation has been added for new functionality
      - Old documentation affected by the pull request has been updated
      - JavaDoc for public methods has been added
    
    - [ ] Tests & Build
      - Functionality added by the pull request is covered by tests
      - `mvn clean verify` has been executed successfully locally or a Travis build has passed


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dawidwys/flink checkstyle-java

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/4343.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 #4343
    
----
commit 2629d44c5b04b396f16e750f12e269e1def81a6d
Author: Dawid Wysakowicz <dw...@apache.org>
Date:   2017-07-14T08:37:49Z

    [FLINK-7190] Activate checkstyle flink-java/*

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #4343: [FLINK-7190] Activate checkstyle flink-java/*

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:

    https://github.com/apache/flink/pull/4343
  
    @greghogan I agree, expanding the suppression files would be nice.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #4343: [FLINK-7190] Activate checkstyle flink-java/*

Posted by greghogan <gi...@git.apache.org>.
Github user greghogan commented on the issue:

    https://github.com/apache/flink/pull/4343
  
    What if we first split the suppressions files as with `suppressions-runtime.xml`? I think we could do this in one ticket for all of `core`, `java`, and `optimizer`.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #4343: [FLINK-7190] Activate checkstyle flink-java/*

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:

    https://github.com/apache/flink/pull/4343
  
    merging.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #4343: [FLINK-7190] Activate checkstyle flink-java/*

Posted by dawidwys <gi...@git.apache.org>.
Github user dawidwys commented on the issue:

    https://github.com/apache/flink/pull/4343
  
    This is the last commit of series. It enables the stricter checkstyle. So should be merged last.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink issue #4343: [FLINK-7190] Activate checkstyle flink-java/*

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:

    https://github.com/apache/flink/pull/4343
  
    The switch statements can be modified to be checkstyle compliant with few changes.
    `NestedMethodAnalyzer#naryOperation`:
    ```
    ...
    case INVOKESTATIC:
    case INVOKESPECIAL:
    case INVOKEVIRTUAL:
    case INVOKEINTERFACE:
    	isStatic = insn.getOpCoed() == INVOKESTATIC;
    ...
    ```
    
    `NestedMethodAnalyzer#copyOperation`:
    ```
    ...
    case DUP2_X2:
    	if (isTagged(value) && tagged(value).isInput() && tagged(value).isCallByValue()) {
    		return tagged(value).copy();
    	} else {
    		return super.copyOperation(insn, value);
    	}
    ...
    ```
    



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #4343: [FLINK-7190] Activate checkstyle flink-java/*

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/4343


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #4343: [FLINK-7190] Activate checkstyle flink-java/*

Posted by dawidwys <gi...@git.apache.org>.
Github user dawidwys commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4343#discussion_r127579802
  
    --- Diff: tools/maven/suppressions-java.xml ---
    @@ -24,6 +24,9 @@ under the License.
     
     <suppressions>
     	<suppress
    -		files=".*"
    -		checks="NewlineAtEndOfFile|RegexpSingleline|TodoComment|RedundantImport|ImportOrder|RedundantModifier|JavadocMethod|JavadocParagraph|JavadocType|JavadocStyle|PackageName|TypeNameCheck|ConstantNameCheck|StaticVariableNameCheck|MemberNameCheck|MethodNameCheck|ParameterName|LocalFinalVariableName|LocalVariableName|LeftCurly|UpperEll|FallThrough|reliefPattern|SimplifyBooleanExpression|EmptyStatement|ModifierOrder|EmptyLineSeparator|WhitespaceAround|WhitespaceAfter|NoWhitespaceAfter|NoWhitespaceBefore|OperatorWrap|ParenPad"/>
    +		files="ExecutionEnvironment\.java"
    +		checks="JavadocParagraph"/>
    +	<suppress
    --- End diff --
    
    In NestedMethodAnalyzer:358-362, there is an intentional fall through which I would require a bit bigger refactoring to eliminate.
    
    For the ExecutionEnvironment it was because we linked in javadoc to class from a package that flink-java does not depend on. I've checked the generated docs, and the links do not work nevertheless, so I removed the suppression and changed `{@link` to `{@code`.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request #4343: [FLINK-7190] Activate checkstyle flink-java/*

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4343#discussion_r127502548
  
    --- Diff: tools/maven/suppressions-java.xml ---
    @@ -24,6 +24,9 @@ under the License.
     
     <suppressions>
     	<suppress
    -		files=".*"
    -		checks="NewlineAtEndOfFile|RegexpSingleline|TodoComment|RedundantImport|ImportOrder|RedundantModifier|JavadocMethod|JavadocParagraph|JavadocType|JavadocStyle|PackageName|TypeNameCheck|ConstantNameCheck|StaticVariableNameCheck|MemberNameCheck|MethodNameCheck|ParameterName|LocalFinalVariableName|LocalVariableName|LeftCurly|UpperEll|FallThrough|reliefPattern|SimplifyBooleanExpression|EmptyStatement|ModifierOrder|EmptyLineSeparator|WhitespaceAround|WhitespaceAfter|NoWhitespaceAfter|NoWhitespaceBefore|OperatorWrap|ParenPad"/>
    +		files="ExecutionEnvironment\.java"
    +		checks="JavadocParagraph"/>
    +	<suppress
    --- End diff --
    
    why are these excluded?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---