-
Notifications
You must be signed in to change notification settings - Fork 24
/
scalastyle-config.xml
81 lines (66 loc) · 3.68 KB
/
scalastyle-config.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<scalastyle>
<name>Scalastyle configuration for Scala.js</name>
<check level="error" enabled="true" class="org.scalastyle.file.FileTabChecker"/>
<check level="error" enabled="true" class="org.scalastyle.file.WhitespaceEndOfLineChecker"/>
<check level="error" enabled="true" class="org.scalastyle.file.NewLineAtEofChecker"/>
<!--Indentation checker, whilst useful gives false positives on the file headers, so disabled for now-->
<check level="error" enabled="false" class="org.scalastyle.file.IndentationChecker"/>
<!--
Enforce the hard limit on line length, which is 120 characters.
Most of the time the soft limit of 80 characters should be observed, but
we can hardly tell an automated style checker about a soft limit.
-->
<check level="error" enabled="true" class="org.scalastyle.file.FileLineLengthChecker">
<parameters>
<parameter name="maxLineLength"><![CDATA[120]]></parameter>
</parameters>
</check>
<check level="error" enabled="true" class="org.scalastyle.scalariform.RedundantIfChecker"/>
<check level="error" enabled="true" class="org.scalastyle.scalariform.SimplifyBooleanExpressionChecker"/>
<check level="error" enabled="true" class="org.scalastyle.scalariform.UppercaseLChecker"/>
<check level="error" enabled="true" class="org.scalastyle.scalariform.ProcedureDeclarationChecker"/>
<check level="error" enabled="true" class="org.scalastyle.scalariform.ClassNamesChecker">
<parameters>
<parameter name="regex"><![CDATA[^[A-Z][A-Za-z0-9]*$]]></parameter>
</parameters>
</check>
<check level="error" enabled="true" class="org.scalastyle.scalariform.ObjectNamesChecker">
<parameters>
<parameter name="regex"><![CDATA[^[A-Z][A-Za-z0-9]*$]]></parameter>
</parameters>
</check>
<check level="error" enabled="true" class="org.scalastyle.scalariform.PackageObjectNamesChecker">
<parameters>
<parameter name="regex"><![CDATA[^[a-z][A-Za-z]*$]]></parameter>
</parameters>
</check>
<check level="error" enabled="true" class="org.scalastyle.scalariform.EqualsHashCodeChecker"/>
<check level="error" enabled="true" class="org.scalastyle.scalariform.CovariantEqualsChecker"/>
<check level="error" enabled="true" class="org.scalastyle.scalariform.IllegalImportsChecker">
<parameters>
<parameter name="illegalImports"><![CDATA[sun._,java.awt._]]></parameter>
</parameters>
</check>
<check level="error" enabled="true" class="org.scalastyle.scalariform.ReturnChecker"/>
<check level="error" enabled="true" class="org.scalastyle.scalariform.EmptyClassChecker"/>
<!-- Currently too strict, see https://github.com/scalastyle/scalastyle/issues/142 -->
<check level="error" enabled="false" class="org.scalastyle.scalariform.ForBraceChecker"/>
<check level="error" enabled="true" class="org.scalastyle.scalariform.PublicMethodsHaveTypeChecker"/>
<check level="error" enabled="true" class="org.scalastyle.scalariform.NoWhitespaceBeforeLeftBracketChecker"/>
<check level="error" enabled="true" class="org.scalastyle.scalariform.NoWhitespaceAfterLeftBracketChecker"/>
<check level="error" enabled="true" class="org.scalastyle.scalariform.DisallowSpaceBeforeTokenChecker">
<parameters>
<parameter name="tokens">COLON, COMMA, RPAREN</parameter>
</parameters>
</check>
<check level="error" enabled="true" class="org.scalastyle.scalariform.DisallowSpaceAfterTokenChecker">
<parameters>
<parameter name="tokens">LPAREN</parameter>
</parameters>
</check>
<check level="error" enabled="true" class="org.scalastyle.scalariform.EnsureSingleSpaceAfterTokenChecker">
<parameters>
<parameter name="tokens">IF, FOR, WHILE, DO, TRY</parameter>
</parameters>
</check>
</scalastyle>