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