Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14490#discussion_r73458908
  
    --- Diff: scalastyle-config.xml ---
    @@ -250,6 +250,14 @@ This file is divided into 3 sections:
         <customMessage>Omit braces in case clauses.</customMessage>
       </check>
     
    +  <!-- SPARK-16877: Avoid Java annotations -->
    +  <check customId="OverrideJavaCase" level="error" 
class="org.scalastyle.scalariform.TokenChecker" enabled="true">
    +    <parameters><parameter name="regex">^Override$</parameter></parameters>
    --- End diff --
    
    BTW, actually I tried `RegexChecker` as well to grep this case but then I 
found actually I should come up with a complex regular expression for some 
exceptional cases such as 
    
    - `@Override` in comments
    
    ```scala
      /**
    ...
       *    @Override
       *    public void close(Throwable errorOrNull) {
       *      // close the connection
       *    }
    ...
    ```
    
    - `@Override` in codegen
    
    ```scala
    ...
    "  @Override public String toString() { return \"" + toStringValue + "\"; 
}}"
    ...
    ```
    
    So, I had to use `TokenChecker`.


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to