PMD, run with the project's own pmd.xml ruleset exactly as the CI site build does (mvn pmd:pmd, maven-pmd-plugin 3.26.0 / PMD 7.7.0 on commit 255b812), reports 117 violations in 19 files (1 × priority 2, 12 × priority 3, 104 × priority 4). The report is generated on every build but never gated, so the count only grows.
Substantive violations (16, fix individually)
| Rule |
Location |
Note |
| AvoidMultipleUnaryOperators (P2) |
core/common/TypeConverter.java:294 |
double unary operator; check the intended sign handling (1's/2's complement helpers) |
| EmptyCatchBlock |
client/runner/AbstractIpmiRunner.java:174 |
closeSession failure silently ignored in close() |
| EmptyCatchBlock |
client/runner/GetFrusRunner.java:188, :225, :236 |
FRU read / decode failures swallowed ("Nothing can be done") – a lost packet yields a truncated FRU without any log (see #102) |
| EmptyCatchBlock |
core/connection/ConnectionManager.java:144 |
InterruptedException swallowed (// TODO log) – see #79 |
| EmptyCatchBlock |
core/connection/queue/MessageQueue.java:152 |
InterruptedException swallowed (// TODO log) – see #79 |
| EmptyCatchBlock |
core/transport/UdpMessenger.java:222 |
InterruptedException swallowed in send() (// TODO: log) |
| EmptyControlStatement + UnconditionalIfStatement |
core/coding/commands/fru/ReadFruData.java:259 |
if that is always true/false with an empty body (the SPD TODO, see #107) |
| EmptyControlStatement |
core/api/sol/SerialOverLan.java:568 |
empty while – busy-wait |
| UnnecessaryReturn |
core/api/async/IpmiAsyncConnector.java:372 |
|
| DontCallThreadRun |
core/transport/UdpMessenger.java:119, core/transport/UdpNotifier.java:46, core/coding/DecoderRunner.java:451 |
run() called directly instead of start() – in UdpMessenger this is the receive loop started from the constructor; verify the intent |
| AvoidUsingHardCodedIP |
core/transport/UdpMessenger.java:50 |
DEFAULT_ADDRESS hard-coded |
Mechanical violations (101, fix in bulk)
- UnnecessaryFullyQualifiedName (66):
DecoderRunner ×26, TypeConverter ×21, ProductInfo ×7, BoardInfo ×5, ChassisInfo ×3, SolAckState ×3, UdpMessenger ×1 – e.g. java.lang.Thread.sleep(...), TypeConverter.* qualified inside TypeConverter itself.
- UselessParentheses (35):
GetChassisStatusResponseData ×23, TypeConverter ×4, CipherSuite ×3, BoardInfo, ChassisInfo, FullSensorRecord, GetSensorReading, ProductInfo ×1 each.
DecoderRunner alone accounts for 27 violations and is a main() harness that should simply be deleted (#99).
Acceptance
mvn pmd:pmd pmd:cpd reports 0 violations with pmd.xml.
- Consider adding
pmd:check (and cpd-check, see the CPD issue) to the verify phase, as done in winrm-java, so the report stays clean.
PMD, run with the project's own
pmd.xmlruleset exactly as the CI site build does (mvn pmd:pmd, maven-pmd-plugin 3.26.0 / PMD 7.7.0 on commit 255b812), reports 117 violations in 19 files (1 × priority 2, 12 × priority 3, 104 × priority 4). The report is generated on every build but never gated, so the count only grows.Substantive violations (16, fix individually)
core/common/TypeConverter.java:294client/runner/AbstractIpmiRunner.java:174closeSessionfailure silently ignored inclose()client/runner/GetFrusRunner.java:188,:225,:236core/connection/ConnectionManager.java:144InterruptedExceptionswallowed (// TODO log) – see #79core/connection/queue/MessageQueue.java:152InterruptedExceptionswallowed (// TODO log) – see #79core/transport/UdpMessenger.java:222InterruptedExceptionswallowed insend()(// TODO: log)core/coding/commands/fru/ReadFruData.java:259ifthat is always true/false with an empty body (the SPDTODO, see #107)core/api/sol/SerialOverLan.java:568while– busy-waitcore/api/async/IpmiAsyncConnector.java:372core/transport/UdpMessenger.java:119,core/transport/UdpNotifier.java:46,core/coding/DecoderRunner.java:451run()called directly instead ofstart()– inUdpMessengerthis is the receive loop started from the constructor; verify the intentcore/transport/UdpMessenger.java:50DEFAULT_ADDRESShard-codedMechanical violations (101, fix in bulk)
DecoderRunner×26,TypeConverter×21,ProductInfo×7,BoardInfo×5,ChassisInfo×3,SolAckState×3,UdpMessenger×1 – e.g.java.lang.Thread.sleep(...),TypeConverter.*qualified insideTypeConverteritself.GetChassisStatusResponseData×23,TypeConverter×4,CipherSuite×3,BoardInfo,ChassisInfo,FullSensorRecord,GetSensorReading,ProductInfo×1 each.DecoderRunneralone accounts for 27 violations and is amain()harness that should simply be deleted (#99).Acceptance
mvn pmd:pmd pmd:cpdreports 0 violations withpmd.xml.pmd:check(andcpd-check, see the CPD issue) to theverifyphase, as done in winrm-java, so the report stays clean.