AuthMe/AuthMeReloaded

View on GitHub
src/main/java/fr/xephi/authme/datasource/PostgreSqlDataSource.java

Summary

Maintainability
A
0 mins
Test Coverage

NCSS for this method is 46 (max allowed is 40).
Open

    private void checkTablesAndColumns() throws SQLException {

Determines complexity of methods, classes and files bycounting the Non Commenting Source Statements (NCSS). Thischeck adheres to the specification for theJavaNCSS-Toolwritten by Chr. Clemens Lee.

Roughly said the NCSS metric is calculated bycounting the source lines which are not comments, (nearly)equivalent to counting the semicolons and opening curly braces.

The NCSS for a class is summarized from the NCSSof all its methods, the NCSS of its nested classes and thenumber of member variable declarations.

The NCSS for a file is summarized from the ncss of all its top level classes,the number of imports and the package declaration.

Rationale: Too large methods and classes are hard to read andcostly to maintain. A large NCSS number often means that amethod or class has too many responsibilities and/orfunctionalities which should be decomposed into smaller units.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

Cyclomatic Complexity is 21 (max allowed is 15).
Open

    private void checkTablesAndColumns() throws SQLException {

Checks cyclomatic complexity against a specified limit.It is a measure of the minimum number ofpossible paths through the source and therefore the number ofrequired tests, it is not a about quality of code!It is only applied to methods, c-tors,static initializers and instance initializers.

The complexity is equal to the number of decision points + 1.Decision points: if, while, do, for, ?:, catch, switch, casestatements and operators && and ||in the body of target.

By pure theory level 1-4 is considered easy to test, 5-7 OK, 8-10consider re-factoring to ease testing, and 11+ re-factor now as testing will be painful.

When it comes to code quality measurement by this metriclevel 10 is very good level as a ultimate target (that is hard to archive).Do not be ashamed to have complexity level 15 or even higher,but keep it below 20 to catch really bad designed code automatically.

Please use Suppression to avoid violations on cases that could not be split in fewmethods without damaging readability of code or encapsulation.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

There are no issues that match your filters.

Category
Status