facebook pixelScala Static Analysis Rules
BACK TO LIST

Scala rules

Codiga provides multiple set of rules for 12+ languages. Below we provide a link and a description for all the rules supported by our platform. Note that not all the rules are being listed and described below.

org.scalastyle.scalariform.ClassNamesChecker

Design
Medium

Incorrect class name

Learn more

org.scalastyle.scalariform.CyclomaticComplexityChecker

Design
Critical

Cyclomatic complexity too high

org.scalastyle.scalariform.IllegalImportsChecker

Best practice
Minor

Import from illegal package

org.scalastyle.scalariform.MultipleStringLiteralsChecker

Best practice
Medium

Literal string appears too much in the file

org.scalastyle.scalariform.UppercaseLChecker

Code style
Minor

Use an uppercase character for long literals

org.scalastyle.scalariform.NullChecker

Best practice
High

Do not use null

org.scalastyle.file.RegexChecker

Error prone
High

Checks that a regular expression cannot be matched, if found reports this

org.scalastyle.file.WhitespaceEndOfLineChecker

Code style
Minor

Check that there is no trailing whitespace at the end of lines

org.scalastyle.scalariform.ClassTypeParameterChecker

Code style
Medium

Checks that type parameter to a class matches a regular expression

org.scalastyle.scalariform.EmptyClassChecker

Code style
Minor

If a class/trait has no members, the braces are unnecessary

org.scalastyle.scalariform.IfBraceChecker

Best practice
Medium

Checks that if statements have braces

org.scalastyle.scalariform.ImportGroupingChecker

Code style
Minor

Checks that imports are grouped together, not throughout the file

org.scalastyle.scalariform.LowercasePatternMatchChecker

Error prone
Medium

Checks that a case statement pattern match is not lower case, as this can cause confusion

org.scalastyle.scalariform.MethodLengthChecker

Best practice
Medium

Checks that methods do not exceed a maximum length

org.scalastyle.scalariform.MethodNamesChecker

Best practice
Minor

Check that method names match a regular expression

org.scalastyle.scalariform.NoWhitespaceBeforeLeftBracketChecker

Code style
Minor

No whitespace before left bracket ‘[’

org.scalastyle.scalariform.NumberOfMethodsInTypeChecker

Best practice
Medium

Check that a class / trait / object does not have too many methods

org.scalastyle.scalariform.ObjectNamesChecker

Code style
Minor

Check that object names match a regular expression

org.scalastyle.scalariform.ParameterNumberChecker

Design
High

Maximum number of parameters for a method

org.scalastyle.scalariform.PublicMethodsHaveTypeChecker

Best practice
Medium

Check that a method has an explicit return type, it is not inferred

org.scalastyle.scalariform.ReturnChecker

Best practice
Medium

Check that return is not used

org.scalastyle.scalariform.SimplifyBooleanExpressionChecker

Error prone
High

Boolean expression can be simplified

org.scalastyle.scalariform.SpacesAfterPlusChecker

Code style
Minor

Check that the plus sign is followed by a space

org.scalastyle.scalariform.SpacesBeforePlusChecker

Code style
Minor

Check that the plus sign is preceded by a space

org.scalastyle.file.FileTabChecker

Code style
Minor

Line contains a tab

org.scalastyle.scalariform.NumberOfTypesChecker

Best practice
Medium

Number of types declared in the file exceeds 30

org.scalastyle.scalariform.NoWhitespaceAfterLeftBracketChecker

Code style
Minor

No space after a left bracket

org.scalastyle.scalariform.StructuralTypeChecker

Code style
Minor

Avoid using structural types