Checkstyle Results
The following document contains the results of Checkstyle 10.13.0 with /builds/niklas.parhammer02/hslu-ad/config/checkstyle/checkstyle.xml ruleset.
Summary
| Files | |||
|---|---|---|---|
| 98 | 0 | 0 | 135 |
Files
Rules
| Category | Rule | Violations | Severity |
|---|---|---|---|
| blocks | NeedBraces | 2 | |
| coding | AvoidInlineConditionals | 1 | |
HiddenField
|
6 | ||
| design | DesignForExtension | 4 | |
| HideUtilityClassConstructor | 8 | ||
| imports | AvoidStarImport | 5 | |
| UnusedImports | 16 | ||
| javadoc | JavadocMethod | 3 | |
| JavadocStyle | 6 | ||
| misc | ArrayTypeStyle | 4 | |
| FinalParameters | 48 | ||
| modifier | ModifierOrder | 2 | |
| RedundantModifier | 14 | ||
| naming | ConstantName | 4 | |
| sizes | LineLength
|
12 |
Details
ch/hslu/exercises/sw05/input/ex2/DemoBankAccount.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| design | HideUtilityClassConstructor | Utility classes should not have a public or default constructor. | 10 | |
| naming | ConstantName | Name 'number' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'. | 12 | |
| naming | ConstantName | Name 'amount' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'. | 13 | |
| naming | ConstantName | Name 'sourceBankAccounts' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'. | 14 | |
| naming | ConstantName | Name 'targetBankAccounts' must match pattern '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'. | 17 | |
| misc | FinalParameters | Parameter args should be final. | 22 | |
| sizes | LineLength | Line is longer than 120 characters (found 124). | 26 | |
| sizes | LineLength | Line is longer than 120 characters (found 144). | 42 |
ch/hslu/exercises/sw05/input/ex3/JoinAndSleep.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| design | HideUtilityClassConstructor | Utility classes should not have a public or default constructor. | 11 | |
| misc | FinalParameters | Parameter args should be final. | 21 |
ch/hslu/exercises/sw05/input/ex3/JoinAndSleepTask.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| misc | FinalParameters | Parameter joinFor should be final. | 23 | |
| javadoc | JavadocMethod | Expected @param tag for 'joinFor'. | 23 |
ch/hslu/exercises/sw06/ex1/DemoWaitPool.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| design | HideUtilityClassConstructor | Utility classes should not have a public or default constructor. | 4 | |
| misc | ArrayTypeStyle | Array brackets at illegal position. | 8 |
ch/hslu/exercises/sw06/ex2/Latch.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| design | DesignForExtension | Class 'Latch' looks like designed for extension (can be subclassed), but the method 'acquire' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'Latch' final or making the method 'acquire' static/final/abstract/empty, or adding allowed annotation for the method. | 12 | |
| modifier | ModifierOrder | 'public' modifier out of order with the JLS suggestions. | 13 | |
| design | DesignForExtension | Class 'Latch' looks like designed for extension (can be subclassed), but the method 'release' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'Latch' final or making the method 'release' static/final/abstract/empty, or adding allowed annotation for the method. | 19 | |
| modifier | ModifierOrder | 'public' modifier out of order with the JLS suggestions. | 20 |
ch/hslu/exercises/sw06/ex2/RaceHorse.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| javadoc | JavadocMethod | Expected @param tag for 'counter'. | 27 |
ch/hslu/exercises/sw06/ex2/Synch.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| modifier | RedundantModifier | Redundant 'public' modifier. | 13 | |
| modifier | RedundantModifier | Redundant 'public' modifier. | 18 |
ch/hslu/exercises/sw06/ex4/BoundedBuffer.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| misc | FinalParameters | Parameter elem should be final. | 43 | |
| misc | FinalParameters | Parameter millis should be final. | 43 | |
| misc | FinalParameters | Parameter millis should be final. | 53 | |
| misc | FinalParameters | Parameter elem should be final. | 61 |
ch/hslu/exercises/sw06/ex4/Buffer.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| modifier | RedundantModifier | Redundant 'final' modifier. | 16 | |
| modifier | RedundantModifier | Redundant 'final' modifier. | 27 | |
| modifier | RedundantModifier | Redundant 'final' modifier. | 27 | |
| modifier | RedundantModifier | Redundant 'final' modifier. | 45 |
ch/hslu/exercises/sw06/ex4/DemoBoundedBuffer.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| misc | ArrayTypeStyle | Array brackets at illegal position. | 28 |
ch/hslu/exercises/sw08/ex1/PrimeCheck.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| imports | UnusedImports | Unused import - java.math.BigInteger. | 3 | |
| imports | UnusedImports | Unused import - java.util.Random. | 5 | |
| misc | FinalParameters | Parameter args should be final. | 28 |
ch/hslu/exercises/sw08/ex2/AtomicCounter.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| javadoc | JavadocStyle | First sentence should end with a period. | 17 | |
| javadoc | JavadocStyle | First sentence should end with a period. | 25 | |
| javadoc | JavadocStyle | First sentence should end with a period. | 33 |
ch/hslu/exercises/sw08/ex2/CountTask.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| misc | FinalParameters | Parameter counter should be final. | 19 | |
| misc | FinalParameters | Parameter counts should be final. | 19 | |
| design | DesignForExtension | Class 'CountTask' looks like designed for extension (can be subclassed), but the method 'call' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'CountTask' final or making the method 'call' static/final/abstract/empty, or adding allowed annotation for the method. | 24 |
ch/hslu/exercises/sw08/ex2/Counter.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| modifier | RedundantModifier | Redundant 'public' modifier. | 10 | |
| modifier | RedundantModifier | Redundant 'public' modifier. | 17 | |
| modifier | RedundantModifier | Redundant 'public' modifier. | 24 |
ch/hslu/exercises/sw08/ex2/SpeedCount.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| sizes | LineLength | Line is longer than 120 characters (found 124). | 34 | |
| misc | FinalParameters | Parameter counter should be final. | 34 | |
| misc | FinalParameters | Parameter counts should be final. | 34 | |
| misc | FinalParameters | Parameter threads should be final. | 34 | |
| modifier | RedundantModifier | Redundant 'final' modifier. | 38 | |
| misc | ArrayTypeStyle | Array brackets at illegal position. | 61 |
ch/hslu/exercises/sw08/ex2/SynchronizedCounter.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| javadoc | JavadocStyle | First sentence should end with a period. | 16 | |
| javadoc | JavadocStyle | First sentence should end with a period. | 27 | |
| javadoc | JavadocStyle | First sentence should end with a period. | 38 |
ch/hslu/exercises/sw08/ex3/DemoBankAccount.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| imports | UnusedImports | Unused import - java.util.Collection. | 4 | |
| misc | FinalParameters | Parameter args should be final. | 34 | |
| sizes | LineLength | Line is longer than 120 characters (found 125). | 48 | |
| modifier | RedundantModifier | Redundant 'final' modifier. | 48 |
ch/hslu/exercises/sw08/ex4/DemoConcurrentList.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| imports | AvoidStarImport | Using the '.*' form of import should be avoided - java.util.*. | 3 | |
| modifier | RedundantModifier | Redundant 'final' modifier. | 35 |
ch/hslu/exercises/sw11/ex1/mergesort/MergesortTask.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| imports | UnusedImports | Unused import - java.util.HashSet. | 19 | |
| imports | UnusedImports | Unused import - java.util.Set. | 20 | |
| coding | HiddenField | 'min' hides a field. | 71 | |
| misc | FinalParameters | Parameter mid should be final. | 71 | |
| misc | FinalParameters | Parameter max should be final. | 71 | |
| coding | HiddenField | 'max' hides a field. | 71 |
ch/hslu/exercises/sw11/ex1/mergesort/MergesortTaskTest.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| imports | AvoidStarImport | Using the '.*' form of import should be avoided - org.junit.jupiter.api.Assertions.*. | 14 | |
| sizes | LineLength | Line is longer than 120 characters (found 130). | 49 | |
| misc | FinalParameters | Parameter threshold should be final. | 82 | |
| misc | FinalParameters | Parameter threshold should be final. | 104 |
ch/hslu/exercises/sw11/ex1/n41/array/sort/SortTask.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| coding | HiddenField | 'min' hides a field. | 57 | |
| coding | HiddenField | 'max' hides a field. | 57 | |
| coding | HiddenField | 'min' hides a field. | 63 | |
| coding | HiddenField | 'max' hides a field. | 63 |
ch/hslu/exercises/sw11/ex2/quicksort/DemoQuicksort.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| modifier | RedundantModifier | Redundant 'final' modifier. | 43 | |
| sizes | LineLength | Line is longer than 120 characters (found 134). | 52 | |
| sizes | LineLength | Line is longer than 120 characters (found 121). | 56 | |
| sizes | LineLength | Line is longer than 120 characters (found 126). | 63 | |
| sizes | LineLength | Line is longer than 120 characters (found 122). | 69 | |
| misc | FinalParameters | Parameter arrayOriginal should be final. | 74 | |
| misc | FinalParameters | Parameter size should be final. | 74 | |
| misc | FinalParameters | Parameter arrayOriginal should be final. | 87 | |
| misc | FinalParameters | Parameter size should be final. | 87 | |
| misc | FinalParameters | Parameter arrayOriginal should be final. | 100 | |
| misc | FinalParameters | Parameter size should be final. | 100 | |
| misc | FinalParameters | Parameter pool should be final. | 100 | |
| misc | FinalParameters | Parameter threshold should be final. | 100 |
ch/hslu/exercises/sw11/ex2/quicksort/QuicksortRecursive.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| design | HideUtilityClassConstructor | Utility classes should not have a public or default constructor. | 21 | |
| misc | FinalParameters | Parameter array should be final. | 28 | |
| misc | FinalParameters | Parameter array should be final. | 39 | |
| misc | FinalParameters | Parameter startIdx should be final. | 39 | |
| misc | FinalParameters | Parameter endIdx should be final. | 39 | |
| misc | FinalParameters | Parameter array should be final. | 57 | |
| misc | FinalParameters | Parameter left should be final. | 57 | |
| misc | FinalParameters | Parameter right should be final. | 57 |
ch/hslu/exercises/sw11/ex2/quicksort/QuicksortTask.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| misc | FinalParameters | Parameter array should be final. | 35 | |
| javadoc | JavadocMethod | Expected @param tag for 'threshold'. | 35 | |
| misc | FinalParameters | Parameter array should be final. | 46 | |
| misc | FinalParameters | Parameter left should be final. | 46 | |
| misc | FinalParameters | Parameter right should be final. | 46 | |
| sizes | LineLength | Line is longer than 120 characters (found 142). | 65 |
ch/hslu/exercises/sw11/ex3/fibo/DemoFibonacciCalc.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| imports | UnusedImports | Unused import - java.time.Instant. | 22 | |
| imports | UnusedImports | Unused import - java.util.concurrent.ExecutorService. | 25 | |
| imports | UnusedImports | Unused import - java.util.concurrent.Executors. | 26 | |
| imports | UnusedImports | Unused import - java.util.concurrent.Future. | 28 | |
| imports | UnusedImports | Unused import - java.util.stream.Stream. | 30 | |
| coding | AvoidInlineConditionals | Avoid inline conditionals. | 68 | |
| modifier | RedundantModifier | Redundant 'final' modifier. | 134 |
ch/hslu/exercises/sw11/ex4/findfile/FindFile.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| imports | UnusedImports | Unused import - java.util.Collections. | 19 | |
| imports | UnusedImports | Unused import - java.util.concurrent.ExecutorService. | 20 | |
| imports | UnusedImports | Unused import - java.util.concurrent.Executors. | 21 |
ch/hslu/exercises/sw11/ex4/findfile/FindFileTask.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| imports | UnusedImports | Unused import - java.util.Arrays. | 19 | |
| imports | UnusedImports | Unused import - java.util.Collections. | 20 | |
| misc | FinalParameters | Parameter regex should be final. | 40 | |
| misc | FinalParameters | Parameter dir should be final. | 40 |
ch/hslu/exercises/sw11/ex4/findfile/MaximumNew.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| design | DesignForExtension | Class 'MaximumNew' looks like designed for extension (can be subclassed), but the method 'call' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'MaximumNew' final or making the method 'call' static/final/abstract/empty, or adding allowed annotation for the method. | 6 |
ch/hslu/exercises/sw12/ex7/Language.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| design | HideUtilityClassConstructor | Utility classes should not have a public or default constructor. | 3 |
ch/hslu/exercises/sw12/ex7/LanguageTest.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| imports | AvoidStarImport | Using the '.*' form of import should be avoided - org.junit.jupiter.api.Assertions.*. | 5 |
ch/hslu/exercises/sw12/ex7/State.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| misc | FinalParameters | Parameter c should be final. | 6 | |
| misc | FinalParameters | Parameter c should be final. | 16 | |
| misc | FinalParameters | Parameter c should be final. | 26 | |
| misc | FinalParameters | Parameter c should be final. | 38 | |
| misc | FinalParameters | Parameter c should be final. | 48 | |
| misc | FinalParameters | Parameter c should be final. | 58 |
ch/hslu/exercises/sw13/ex3/KMPSearch.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| design | HideUtilityClassConstructor | Utility classes should not have a public or default constructor. | 3 |
ch/hslu/exercises/sw13/ex3/KMPSearchTest.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| imports | AvoidStarImport | Using the '.*' form of import should be avoided - org.junit.jupiter.api.Assertions.*. | 5 |
ch/hslu/exercises/sw13/ex5/QuickSearch.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| imports | UnusedImports | Unused import - org.apache.commons.lang3.StringUtils. | 3 | |
| design | HideUtilityClassConstructor | Utility classes should not have a public or default constructor. | 5 | |
| sizes | LineLength | Line is longer than 120 characters (found 122). | 27 | |
| sizes | LineLength | Line is longer than 120 characters (found 132). | 30 | |
| misc | FinalParameters | Parameter optimalPattern should be final. | 47 | |
| misc | FinalParameters | Parameter mismatchingChar should be final. | 47 |
ch/hslu/exercises/sw13/ex5/QuickSearchTest.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| imports | AvoidStarImport | Using the '.*' form of import should be avoided - org.junit.jupiter.api.Assertions.*. | 5 |
ch/hslu/exercises/sw14/Sort.java
| Severity | Category | Rule | Message | Line |
|---|---|---|---|---|
| design | HideUtilityClassConstructor | Utility classes should not have a public or default constructor. | 4 | |
| blocks | NeedBraces | 'if' construct must use '{}'s. | 57 | |
| blocks | NeedBraces | 'if' construct must use '{}'s. | 58 | |
| misc | FinalParameters | Parameter arr should be final. | 82 | |
| misc | ArrayTypeStyle | Array brackets at illegal position. | 104 |

