Write Your Own Code Checker: An Automated Test-Driven Checker Development Approach with LLMs

Tool Demonstration Site

Try it now View on GitHub

Which rule do you want to check?

AvoidUsingOctalValuesRule 87.50%

Integer literals should not start with zero since this denotes that the rest of literal will be interpreted as an octal value.

ExceptionAsFlowControlRule 85.71%

This rule reports exceptions thrown and caught in an enclosing try statement. This use of exceptions as a form of goto statement is discouraged, as that may hide actual exceptions, and obscures control flow, especially when debugging. To fix a violation, add the necessary validation or use an alternate control structure.

ExcessiveImportsRule 100.00%

A high number of imports can indicate a high degree of coupling within an object. This rule counts the number of imports and reports a violation if the count is above the threshold. The default threshold above which a node is reported is 3.

ExcessivePublicCountRule 100.00%

Classes with large numbers of public methods and attributes require disproportionate testing efforts since combinational side effects grow rapidly and increase risk. The default threshold above which a node is reported is 2.

InefficientEmptyStringCheckRule 94.44%

String.trim().length() == 0 and String.trim().isEmpty() are inefficient ways to check if a String is really blank. Prevent it.

StringInstantiationRule 90.00%

Avoid instantiating String objects.

NullAssignmentRule 100.00%

Assigning a null to a variable (outside of its declaration) is usually bad form.

LiteralsFirstInComparisonsRule 93.94%

Position literals first in all String comparison methods: non-overloaded 'boolean equals(Object o)' and 'equalsIgnoreCase' and 'compareTo' and 'compareToIgnoreCase' and 'contentEquals', if the second argument is null then NullPointerExceptions can be avoided, they will just return false.