-
Notifications
You must be signed in to change notification settings - Fork 12
/
scalastyle_config.xml
157 lines (156 loc) · 9.29 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?xml version="1.0" encoding="UTF-8"?>
<!--
DO NOT EDIT, IT IS AUTOMATICALLY DOWNLOADED AND CHANGES WILL BE DISCARDED
Many of the following rules might be questionable but because the topic is so subjective
it tries to lay a common ground using the official style guide: http://docs.scala-lang.org/style
-->
<scalastyle commentFilter="enabled">
<name>Avast Scalastyle Configuration</name>
<check class="org.scalastyle.file.FileLengthChecker" level="warning" enabled="true">
<parameters>
<parameter name="maxFileLength">800</parameter>
</parameters>
</check>
<check class="org.scalastyle.file.FileLineLengthChecker" level="warning" enabled="true">
<parameters>
<parameter name="maxLineLength">160</parameter>
<parameter name="tabSize">2</parameter>
<parameter name="ignoreImports">false</parameter>
</parameters>
</check>
<check class="org.scalastyle.file.FileTabChecker" level="warning" enabled="true"/>
<check class="org.scalastyle.file.IndentationChecker" level="warning" enabled="false"/>
<check class="org.scalastyle.file.NewLineAtEofChecker" level="warning" enabled="false"/>
<check class="org.scalastyle.file.NoNewLineAtEofChecker" level="warning" enabled="false"/>
<check class="org.scalastyle.file.RegexChecker" level="warning" enabled="true">
<parameters>
<parameter name="regex"><![CDATA[println]]></parameter>
</parameters>
<customMessage>No println left behind</customMessage>
</check>
<check class="org.scalastyle.file.WhitespaceEndOfLineChecker" level="warning" enabled="true"/>
<check class="org.scalastyle.scalariform.BlockImportChecker" level="warning" enabled="false"/>
<check class="org.scalastyle.scalariform.ClassNamesChecker" level="error" enabled="true">
<parameters>
<parameter name="regex"><![CDATA[^[A-Z][a-zA-Z0-9]*$]]></parameter>
</parameters>
</check>
<check class="org.scalastyle.scalariform.ClassTypeParameterChecker" level="warning" enabled="false"/>
<check class="org.scalastyle.scalariform.CovariantEqualsChecker" level="error" enabled="true"/>
<check class="org.scalastyle.scalariform.CyclomaticComplexityChecker" level="warning" enabled="true">
<parameters>
<parameter name="maximum">15</parameter>
</parameters>
</check>
<check class="org.scalastyle.scalariform.DeprecatedJavaChecker" level="error" enabled="true"/>
<check class="org.scalastyle.scalariform.DisallowSpaceAfterTokenChecker" level="warning" enabled="true">
<parameters>
<parameter name="tokens">LPAREN</parameter>
</parameters>
</check>
<check class="org.scalastyle.scalariform.DisallowSpaceBeforeTokenChecker" level="warning" enabled="true">
<parameters>
<parameter name="tokens">COMMA, RPAREN</parameter>
</parameters>
</check>
<check class="org.scalastyle.scalariform.EmptyClassChecker" level="warning" enabled="true"/>
<check class="org.scalastyle.scalariform.EnsureSingleSpaceAfterTokenChecker" level="warning" enabled="true">
<parameters>
<parameter name="tokens">COLON, IF, WHILE</parameter>
</parameters>
</check>
<check class="org.scalastyle.scalariform.EnsureSingleSpaceBeforeTokenChecker" level="warning" enabled="false"/>
<check class="org.scalastyle.scalariform.EqualsHashCodeChecker" level="error" enabled="true"/>
<check class="org.scalastyle.scalariform.FieldNamesChecker" level="error" enabled="false">
<!-- disabled because does not work well with pattern matching -->
<parameters>
<parameter name="regex"><![CDATA[^[a-zA-Z][a-zA-Z0-9]*$]]></parameter>
</parameters>
</check>
<check class="org.scalastyle.scalariform.ForBraceChecker" level="warning" enabled="false"/>
<check class="org.scalastyle.scalariform.IfBraceChecker" level="warning" enabled="true">
<parameters>
<parameter name="singleLineAllowed">true</parameter>
<parameter name="doubleLineAllowed">true</parameter>
</parameters>
</check>
<check class="org.scalastyle.scalariform.IllegalImportsChecker" level="warning" enabled="true">
<parameters>
<parameter name="illegalImports">sun._,java.awt._</parameter>
</parameters>
</check>
<check class="org.scalastyle.scalariform.ImportGroupingChecker" level="warning" enabled="false"/>
<check class="org.scalastyle.scalariform.ImportOrderChecker" level="warning" enabled="false"/>
<check class="org.scalastyle.scalariform.LowercasePatternMatchChecker" level="warning" enabled="false"/>
<!-- Unfortunately does not work well with default argument values. -->
<check class="org.scalastyle.scalariform.MagicNumberChecker" level="warning" enabled="false"/>
<check class="org.scalastyle.scalariform.MethodLengthChecker" level="warning" enabled="true">
<parameters>
<parameter name="maxLength">50</parameter>
</parameters>
</check>
<check class="org.scalastyle.scalariform.MethodNamesChecker" level="warning" enabled="true">
<parameters>
<parameter name="regex"><![CDATA[^[a-z][a-zA-Z0-9]*(_=)?$]]></parameter>
<parameter name="ignoreRegex">^$</parameter>
<parameter name="ignoreOverride">false</parameter>
</parameters>
</check>
<!-- Unfortunately does not work well with string interpolation -->
<check class="org.scalastyle.scalariform.MultipleStringLiteralsChecker" level="warning" enabled="false"/>
<check class="org.scalastyle.scalariform.NoCloneChecker" level="error" enabled="true"/>
<check class="org.scalastyle.scalariform.NoFinalizeChecker" level="error" enabled="true"/>
<check class="org.scalastyle.scalariform.NoWhitespaceAfterLeftBracketChecker" level="warning" enabled="true"/>
<check class="org.scalastyle.scalariform.NoWhitespaceBeforeLeftBracketChecker" level="warning" enabled="true"/>
<check class="org.scalastyle.scalariform.NonASCIICharacterChecker" level="warning" enabled="true"/>
<check class="org.scalastyle.scalariform.NotImplementedErrorUsage" level="warning" enabled="true"/>
<check class="org.scalastyle.scalariform.NullChecker" level="warning" enabled="false"/>
<check class="org.scalastyle.scalariform.NumberOfMethodsInTypeChecker" level="warning" enabled="true">
<parameters>
<parameter name="maxMethods">30</parameter>
</parameters>
</check>
<check class="org.scalastyle.scalariform.NumberOfTypesChecker" level="warning" enabled="true">
<parameters>
<parameter name="maxTypes">20</parameter>
</parameters>
</check>
<check class="org.scalastyle.scalariform.ObjectNamesChecker" level="warning" enabled="true">
<parameters>
<parameter name="regex"><![CDATA[^[A-Z][a-zA-Z0-9]*$]]></parameter>
</parameters>
</check>
<check class="org.scalastyle.scalariform.PackageObjectNamesChecker" level="warning" enabled="true">
<parameters>
<parameter name="regex"><![CDATA[^[a-z][a-zA-Z]*$]]></parameter>
</parameters>
</check>
<check class="org.scalastyle.scalariform.ParameterNumberChecker" level="warning" enabled="true">
<parameters>
<parameter name="maxParameters">15</parameter>
</parameters>
</check>
<check class="org.scalastyle.scalariform.PatternMatchAlignChecker" level="warning" enabled="false"/>
<check class="org.scalastyle.scalariform.ProcedureDeclarationChecker" level="error" enabled="true"/>
<check class="org.scalastyle.scalariform.PublicMethodsHaveTypeChecker" level="error" enabled="true">
<parameters>
<parameter name="ignoreOverride">false</parameter>
</parameters>
</check>
<check class="org.scalastyle.scalariform.RedundantIfChecker" level="warning" enabled="true"/>
<check class="org.scalastyle.scalariform.ReturnChecker" level="error" enabled="true"/>
<check class="org.scalastyle.scalariform.ScalaDocChecker" level="warning" enabled="false"/>
<check class="org.scalastyle.scalariform.SimplifyBooleanExpressionChecker" level="warning" enabled="true"/>
<check class="org.scalastyle.scalariform.SpaceAfterCommentStartChecker" level="warning" enabled="true"/>
<check class="org.scalastyle.scalariform.SpacesAfterPlusChecker" level="warning" enabled="true"/>
<check class="org.scalastyle.scalariform.SpacesBeforePlusChecker" level="warning" enabled="true"/>
<check class="org.scalastyle.scalariform.StructuralTypeChecker" level="warning" enabled="true"/>
<check class="org.scalastyle.scalariform.TodoCommentChecker" level="warning" enabled="false"/>
<check class="org.scalastyle.scalariform.TokenChecker" level="warning" enabled="false"/>
<check class="org.scalastyle.scalariform.UnderscoreImportChecker" level="warning" enabled="false"/>
<check class="org.scalastyle.scalariform.UppercaseLChecker" level="error" enabled="true"/>
<check class="org.scalastyle.scalariform.VarFieldChecker" level="warning" enabled="true"/>
<check class="org.scalastyle.scalariform.VarLocalChecker" level="warning" enabled="false"/>
<check class="org.scalastyle.scalariform.WhileChecker" level="warning" enabled="false"/>
<check class="org.scalastyle.scalariform.XmlLiteralChecker" level="error" enabled="true"/>
</scalastyle>