The following document contains the results of CodeNarc analysis
CodeNarc Version: 1.5
Report time: 20 maj 2020, 00:06:22
| Total Files | Files with Violations | Total Violations | Priority 1 Violations | Priority 2 Violations | Priority 3 Violations |
|---|---|---|---|---|---|
| 3 | 2 | 5 | 0 | 5 | 0 |
| Package | Files with Violations | Total Violations | Priority 1 Violations | Priority 2 Violations | Priority 3 Violations |
|---|---|---|---|---|---|
| com.example | 1 | 3 | 0 | 3 | 0 |
| com.example.nestedpackage | 1 | 2 | 0 | 2 | 0 |
| Rule Name | Priority | Line | Source Line / Message |
|---|---|---|---|
| DuplicateMapKey | 2 | 5 |
private static final Map DUPLICATE_MAP_KEY = [a: 1, a: 2] Key 'a' is duplicated. |
| BrokenNullCheck | 2 | 8 |
if (name != null || name.length * 0) { } The expression ((name != null) || (name.length * 0)) within class com.example.TestClassWithSomeViolations incorrectly checks for null, and can throw a NullPointerException. |
| EmptyIfStatement | 2 | 8 |
if (name != null || name.length * 0) { } The if statement is empty |
| Rule Name | Priority | Line | Source Line / Message |
|---|---|---|---|
| DeadCode | 2 | 7 |
return 1 This code cannot be reached |
| EmptyIfStatement | 2 | 11 |
if (a % 2 == 0) {} The if statement is empty |