Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
172 lines (157 sloc) 7.49 KB
<!--
Copyright 2016-2017 Daniel Urban and contributors listed in AUTHORS
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<scalastyle>
<name>seals Scalastyle configuration for tests/examples</name>
<!--
Removed from the main Scalastyle config:
- org.scalastyle.scalariform.MagicNumberChecker
- org.scalastyle.file.RegexChecker (println)
- org.scalastyle.file.RegexChecker (s-interpolator)
- org.scalastyle.scalariform.NoWhitespaceBeforeLeftBracketChecker
Modified:
- org.scalastyle.scalariform.ParameterNumberChecker (10 -> 15)
-->
<check level="error" class="org.scalastyle.file.FileTabChecker" enabled="true" />
<check level="error" class="org.scalastyle.file.WhitespaceEndOfLineChecker" enabled="true" />
<check level="error" class="org.scalastyle.file.NewLineAtEofChecker" enabled="true" />
<check level="error" class="org.scalastyle.scalariform.NullChecker" enabled="true" />
<check level="error" class="org.scalastyle.scalariform.VarFieldChecker" enabled="true" />
<check level="error" class="org.scalastyle.scalariform.VarLocalChecker" enabled="true" />
<check level="error" class="org.scalastyle.scalariform.WhileChecker" enabled="true" />
<check level="error" class="org.scalastyle.scalariform.ReturnChecker" enabled="true" />
<check level="error" class="org.scalastyle.scalariform.NoCloneChecker" enabled="true" />
<check level="error" class="org.scalastyle.scalariform.NoFinalizeChecker" enabled="true" />
<check level="error" class="org.scalastyle.scalariform.CovariantEqualsChecker" enabled="true" />
<check level="error" class="org.scalastyle.scalariform.ProcedureDeclarationChecker" enabled="true" />
<check level="error" class="org.scalastyle.scalariform.NotImplementedErrorUsage" enabled="true" />
<check level="error" class="org.scalastyle.scalariform.DeprecatedJavaChecker" enabled="true" />
<check level="error" class="org.scalastyle.scalariform.XmlLiteralChecker" enabled="true" />
<check level="error" class="org.scalastyle.scalariform.PublicMethodsHaveTypeChecker" enabled="true">
<parameters>
<parameter name="ignoreOverride">true</parameter>
</parameters>
</check>
<check level="error" class="org.scalastyle.scalariform.IllegalImportsChecker" enabled="true">
<parameters>
<parameter name="illegalImports">sun._,java.awt._</parameter>
</parameters>
</check>
<check level="error" class="org.scalastyle.file.HeaderMatchesChecker" enabled="true">
<parameters>
<parameter name="regex">true</parameter>
<parameter name="header"><![CDATA[\Q/*
* Copyright \E[0-9,\- ]+\Q Daniel Urban and contributors listed in AUTHORS
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/\E]]></parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.file.FileLengthChecker" enabled="true">
<parameters>
<parameter name="maxFileLength">800</parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.SpacesAfterPlusChecker" enabled="true" />
<check level="warning" class="org.scalastyle.scalariform.SpacesBeforePlusChecker" enabled="true" />
<check level="warning" class="org.scalastyle.file.FileLineLengthChecker" enabled="true">
<parameters>
<parameter name="maxLineLength">160</parameter>
<parameter name="tabSize">4</parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.ClassNamesChecker" enabled="true">
<parameters>
<parameter name="regex">[A-Z][A-Za-z]*</parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.ObjectNamesChecker" enabled="true">
<parameters>
<parameter name="regex">[A-Za-z]+</parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.PackageObjectNamesChecker" enabled="true">
<parameters>
<parameter name="regex">^[a-z][A-Za-z]*$</parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.EqualsHashCodeChecker" enabled="true" />
<check level="warning" class="org.scalastyle.scalariform.ParameterNumberChecker" enabled="true">
<parameters>
<parameter name="maxParameters">15</parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.SpaceAfterCommentStartChecker" enabled="true" />
<check level="warning" class="org.scalastyle.scalariform.CyclomaticComplexityChecker" enabled="true">
<parameters>
<parameter name="maximum">15</parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.UppercaseLChecker" enabled="true" />
<check level="warning" class="org.scalastyle.scalariform.SimplifyBooleanExpressionChecker" enabled="true" />
<check level="warning" class="org.scalastyle.scalariform.RedundantIfChecker" enabled="true" />
<check level="warning" class="org.scalastyle.scalariform.IfBraceChecker" enabled="true">
<parameters>
<parameter name="singleLineAllowed">true</parameter>
<parameter name="doubleLineAllowed">true</parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.MethodLengthChecker" enabled="true">
<parameters>
<parameter name="maxLength">75</parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.NumberOfMethodsInTypeChecker" enabled="true">
<parameters>
<parameter name="maxMethods">30</parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.EmptyClassChecker" enabled="true" />
<check level="warning" class="org.scalastyle.scalariform.EnsureSingleSpaceAfterTokenChecker" enabled="true">
<parameters>
<parameter name="tokens">
PACKAGE, NEW, IMPORT, VAL, VAR, CLASS, DEF, OBJECT, TRAIT,
SEALED, FINAL, ABSTRACT, IMPLICIT, LAZY, OVERRIDE, EXTENDS,
WHILE, DO, TRY, CATCH, THROW, IF, ELSE, MATCH, CASE, FOR, YIELD, FINALLY,
EQUALS, SUBTYPE, SUPERTYPE, OP, LARROW, ARROW, COMMA, PIPE, FORSOME
</parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.EnsureSingleSpaceBeforeTokenChecker" enabled="true">
<parameters>
<parameter name="tokens">
YIELD,
EQUALS, SUBTYPE, SUPERTYPE, OP, LARROW, ARROW, PIPE, FORSOME
</parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.DisallowSpaceBeforeTokenChecker" enabled="true">
<parameters>
<parameter name="tokens">COMMA, RPAREN</parameter>
</parameters>
</check>
<check level="warning" class="org.scalastyle.scalariform.DisallowSpaceAfterTokenChecker" enabled="true">
<parameters>
<parameter name="tokens">LPAREN</parameter>
</parameters>
</check>
</scalastyle>