facebook pixelCodiga Analysis Scala Rules
BACK TO LIST

Scala rules

Codiga provides multiple sets 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
Warning

Incorrect class name

Learn more

org.scalastyle.scalariform.CyclomaticComplexityChecker

Design
Critical

Cyclomatic complexity too high

org.scalastyle.scalariform.IllegalImportsChecker

Best practice
Informational

Import from illegal package

org.scalastyle.scalariform.MultipleStringLiteralsChecker

Best practice
Warning

Literal string appears too much in the file

org.scalastyle.scalariform.UppercaseLChecker

Code style
Informational

Use an uppercase character for long literals

org.scalastyle.scalariform.NullChecker

Best practice
Error

Do not use null

org.scalastyle.file.RegexChecker

Error prone
Error

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

org.scalastyle.file.WhitespaceEndOfLineChecker

Code style
Informational

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

org.scalastyle.scalariform.ClassTypeParameterChecker

Code style
Warning

Checks that type parameter to a class matches a regular expression

org.scalastyle.scalariform.EmptyClassChecker

Code style
Informational

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

org.scalastyle.scalariform.IfBraceChecker

Best practice
Warning

Checks that if statements have braces

org.scalastyle.scalariform.ImportGroupingChecker

Code style
Informational

Checks that imports are grouped together, not throughout the file

org.scalastyle.scalariform.LowercasePatternMatchChecker

Error prone
Warning

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

org.scalastyle.scalariform.MethodLengthChecker

Best practice
Warning

Checks that methods do not exceed a maximum length

org.scalastyle.scalariform.MethodNamesChecker

Best practice
Informational

Check that method names match a regular expression

org.scalastyle.scalariform.NoWhitespaceBeforeLeftBracketChecker

Code style
Informational

No whitespace before left bracket ‘[’

org.scalastyle.scalariform.NumberOfMethodsInTypeChecker

Best practice
Warning

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

org.scalastyle.scalariform.ObjectNamesChecker

Code style
Informational

Check that object names match a regular expression

org.scalastyle.scalariform.ParameterNumberChecker

Design
Error

Maximum number of parameters for a method

org.scalastyle.scalariform.PublicMethodsHaveTypeChecker

Best practice
Warning

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

org.scalastyle.scalariform.ReturnChecker

Best practice
Warning

Check that return is not used

org.scalastyle.scalariform.SimplifyBooleanExpressionChecker

Error prone
Error

Boolean expression can be simplified

org.scalastyle.scalariform.SpacesAfterPlusChecker

Code style
Informational

Check that the plus sign is followed by a space

org.scalastyle.scalariform.SpacesBeforePlusChecker

Code style
Informational

Check that the plus sign is preceded by a space

org.scalastyle.file.FileTabChecker

Code style
Informational

Line contains a tab

org.scalastyle.scalariform.NumberOfTypesChecker

Best practice
Warning

Number of types declared in the file exceeds 30

org.scalastyle.scalariform.NoWhitespaceAfterLeftBracketChecker

Code style
Informational

No space after a left bracket

org.scalastyle.scalariform.StructuralTypeChecker

Code style
Informational

Avoid using structural types