aboutsummaryrefslogtreecommitdiffstats
path: root/scalding/scalastyle-config.xml
diff options
context:
space:
mode:
authorEllen Spertus <ellen.spertus@gmail.com>2018-07-19 15:21:33 -0700
committerEllen Spertus <ellen.spertus@gmail.com>2018-07-19 15:21:33 -0700
commit3c2488978562b34cf60e51546cc71b0cbfbe5eaf (patch)
tree6a2c4d88fd910f040248058667c06ab4b57e1ec6 /scalding/scalastyle-config.xml
parenta02a10d98759015ee200a456ad13b6143cd7fde6 (diff)
downloadsandcrawler-3c2488978562b34cf60e51546cc71b0cbfbe5eaf.tar.gz
sandcrawler-3c2488978562b34cf60e51546cc71b0cbfbe5eaf.zip
Improved style and style checking.
- Excludes checking of files in /example directories. - Warns about block imports, which have been removed. - Checks indenting. Parameters should be indented 2 spaces. See https://docs.scala-lang.org/style/indentation.html#methods-with-numerous-arguments - Imports should be grouped (java.*, scala.*, other), with a blank line between groups
Diffstat (limited to 'scalding/scalastyle-config.xml')
-rw-r--r--scalding/scalastyle-config.xml26
1 files changed, 21 insertions, 5 deletions
diff --git a/scalding/scalastyle-config.xml b/scalding/scalastyle-config.xml
index 2f20677..23ec993 100644
--- a/scalding/scalastyle-config.xml
+++ b/scalding/scalastyle-config.xml
@@ -6,6 +6,13 @@
<parameter name="maxFileLength"><![CDATA[800]]></parameter>
</parameters>
</check>
+<check enabled="true" class="org.scalastyle.file.IndentationChecker" level="warning">
+ <parameters>
+ <parameter name="tabSize">2</parameter>
+ <parameter name="methodParamIndentSize">2</parameter>
+ <parameter name="classParamIndentSize">4</parameter>
+ </parameters>
+</check>
<check level="warning" class="org.scalastyle.file.HeaderMatchesChecker" enabled="false">
<parameters>
<parameter name="header"><![CDATA[// Copyright (C) 2011-2012 the original author or authors.
@@ -50,11 +57,6 @@
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.EqualsHashCodeChecker" enabled="true"></check>
- <check level="warning" class="org.scalastyle.scalariform.IllegalImportsChecker" enabled="true">
- <parameters>
- <parameter name="illegalImports"><![CDATA[sun._,java.awt._]]></parameter>
- </parameters>
- </check>
<check level="warning" class="org.scalastyle.scalariform.ParameterNumberChecker" enabled="true">
<parameters>
<parameter name="maxParameters"><![CDATA[8]]></parameter>
@@ -114,4 +116,18 @@
<check level="warning" class="org.scalastyle.scalariform.PublicMethodsHaveTypeChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.file.NewLineAtEofChecker" enabled="true"></check>
<check level="warning" class="org.scalastyle.file.NoNewLineAtEofChecker" enabled="false"></check>
+ <check enabled="true" class="org.scalastyle.scalariform.BlockImportChecker" level="warning"/>
+ <check enabled="true" class="org.scalastyle.scalariform.ImportOrderChecker" level="warning">
+ <parameters>
+ <parameter name="groups">java,scala,others</parameter>
+ <parameter name="group.java">javax?\..+</parameter>
+ <parameter name="group.scala">scala\..+</parameter>
+ <parameter name="group.others">.+</parameter>
+ </parameters>
+</check>
+ <check level="warning" class="org.scalastyle.scalariform.IllegalImportsChecker" enabled="true">
+ <parameters>
+ <parameter name="illegalImports"><![CDATA[sun._,java.awt._]]></parameter>
+ </parameters>
+ </check>
</scalastyle>