detekt.ArrayPrimitive
Using Array<Primitive> leads to implicit boxing and a performance hit
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.
Using Array<Primitive> leads to implicit boxing and a performance hit
Class and Object names should match the pattern: [A-Z][a-zA-Z0-9]*
Condition is too complex
Function too complex.
Constructor private parameter names should match the pattern: [a-z][A-Za-z0-9]*
When expression has multiple case statements for the same value
Empty catch block detected. If the exception can be safely ignored
The class or object Attempts is empty.
An empty default constructor can be removed.
Detect empty files
This when block is empty.
Enum entry names should match the pattern: [A-Z][\_a-zA-Z0-9]*
Using the forEach method on ranges has a heavy performance cost. Prefer using simple for loops.
Function names should match the pattern: ([a-z][a-zA-Z0-9]*)|(`.*`)
Function parameter names should match the pattern: [a-z][A-Za-z0-9]*
This implementation of Iterator does not correctly implement the next() method as it doesn't throw a NoSuchElementException when no elements remain in the Iterator.
Too many jump statements
Replace magic numbers with a constant
The file name 'does not match the name of the single top-level declaration
Incorrect modifier order
Object constant names should match the pattern: [A-Za-z][\_A-Za-z0-9]*
The abstract keyword on this declaration is unnecessary.
Package name should match the pattern: [a-z]+(\\.[a-z][A-Za-z0-9]*)*
Member with protected visibility in final class is private. Consider using private or internal as modifier.
Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled.
Throwable is a too generic Exception. Prefer throwing specific exceptions that indicate a specific error case.
This expression is followed by unreachable code which should either be used or removed.
The class only contains utility functions. Consider defining it as an object.
Private variable names should match the pattern: (\_)?[a-z][A-Za-z0-9]*
Use qualified import
Empty block of code can be removed.
Empty function block can be removed
Empty if block can be removed
Empty secondary constructor can be removed
A class should always override hashCode when overriding equals and the other way around.
String.format() uses implicitly default locale for string formatting.
Exceptions should not be swallowed.
Exceptions should always call one of the constructor overloads to provide a message or a cause.
We use cookies to improve your site experience, including analytics cookies to understand how you use our product and design better experiences. Please read our Cookie Policy.