Skip to content

Commit

Permalink
Do not force type annotation on overriden methods
Browse files Browse the repository at this point in the history
The scalastyle_config.xml forces the definition
of return types for all public methods, including
overrides. While this may make sense for traits
and interfaces, most of the original code does
not follow this for the overridden methods, causing
some editors (particularly IDEA) to complain and
potentially hide other issues. This patch adds
a parameter to the rule to ignore overrides.

Ref: MINOR_CHANGE

Change-Id: I548841123d77f1a03305c97249a299ced50f837a
Signed-off-by: Ernest Artiaga <ernest@midokura.com>
  • Loading branch information
Ernest Artiaga authored and Mateo Hermida committed Jul 26, 2017
1 parent 0d56a0f commit a5a4f8f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scalastyle_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@
<parameter name="maxMethods"><![CDATA[30]]></parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.PublicMethodsHaveTypeChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.scalariform.PublicMethodsHaveTypeChecker" enabled="true">
<parameters>
<parameter name="ignoreOverride">true</parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.file.NewLineAtEofChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.file.NoNewLineAtEofChecker" enabled="false"></check>
<check level="warning" class="org.scalastyle.scalariform.WhileChecker" enabled="false"></check>
Expand Down Expand Up @@ -139,4 +143,4 @@
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.ImportGroupingChecker" enabled="true"></check>
</scalastyle>
</scalastyle>

0 comments on commit a5a4f8f

Please sign in to comment.