detekt.FunctionOnlyReturningConstant
Function is returning a constant. Prefer declaring a constant instead.
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.
Function is returning a constant. Prefer declaring a constant instead.
Function is too long
Too many parameters
Too many jump statements
Replace magic numbers with a constant
Line is too long
Name confusion
Function nested too deeply.
Package name should match the pattern: [a-z]+(\\.[a-z][A-Za-z0-9]*)*
Too many throw statements in function.
Caught exception is too generic. Prefer catching specific exceptions to the case that is currently handled.
Too many functions in object
Top level constant names should match the pattern: [A-Z][\_A-Z0-9]*
An abstract class without a concrete member can be refactored to an interface.
Reports empty init expressions. Empty blocks of code serve no purpose and should be removed.
String.format() uses implicitly default locale for string formatting.
This method is not expected to throw exceptions. This can cause weird behavior.
Instead of simply printing a stacktrace a better logging solution should be used.
Exceptions should not be swallowed.
Equals methods should always report if some other object is equal to the current object
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.