facebook pixelJava Static Analysis Rules
BACK TO LIST

Java rules

The Codiga Code Analysis engine supports hundreds of rules for Java, checking that your code is safe and secure. Start using Codiga today to check your code and automate your code reviews to find issues in every pull request and merge with confidence.

      AvoidDeeplyNestedIfStmts

      Design
      Medium

      Deeply nested if..then statements are hard to read

      Learn more

      CollapsibleIfStatements

      Design
      Medium

      These nested if statements could be combined

      FinalFieldCouldBeStatic

      Design
      Medium

      This final field could be made static

      ImmutableField

      Design
      Medium

      Private field could be made final; it is only initialized in the declaration or constructor.

      LogicInversion

      Design
      Medium

      Use opposite operator instead of the logic complement operator.

      SimplifiedTernary

      Design
      Medium

      Ternary operators that can be simplified with || or &&

      SimplifyBooleanExpressions

      Design
      Medium

      Avoid unnecessary comparisons in boolean expressions

      SimplifyBooleanReturns

      Design
      Medium

      Avoid unnecessary if..then..else statements when returning booleans

      SimplifyConditional

      Design
      Medium

      No need to check for null before an instanceof

      SwitchDensity

      Design
      Medium

      A high ratio of statements to labels in a switch statement. Consider refactoring.