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
Warning

Deeply nested if..then statements are hard to read

Learn more

CollapsibleIfStatements

Design
Warning

These nested if statements could be combined

FinalFieldCouldBeStatic

Design
Warning

This final field could be made static

ImmutableField

Design
Warning

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

LogicInversion

Design
Warning

Use opposite operator instead of the logic complement operator.

SimplifiedTernary

Design
Warning

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

SimplifyBooleanExpressions

Design
Warning

Avoid unnecessary comparisons in boolean expressions

SimplifyBooleanReturns

Design
Warning

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

SimplifyConditional

Design
Warning

No need to check for null before an instanceof

SwitchDensity

Design
Warning

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

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.