Hi.
A colleague of mine showed
Increment (++) and decrement (--) operators should not be used in a method call or mixed with other operators in an expression
Rule ID: java:S881, Analysis scope: main sources,
Rule repo: Sonar (Java), Effort: 5min, cert
to me and some other colleagues.
I may have issues with the rule reasonings - but that’s for later (maybe).
First a “more structural”(?) question:
In section “More info” three “Resources” are listed:
- CERT, EXP30-C. - Do not depend on the order of evaluation for side effects
- CERT, EXP50-CPP. - Do not depend on the order of evaluation for side effects
- CERT, EXP05-J. - Do not follow a write by a subsequent write or read of the same object within an expression
(including hyperlinks).
Is it by intention that C and C++ resources are given? (The first and the second resource.)
I guess not so, and that they were mentioned by accident/mistake. In these two resources nothing with impact to java is mentioned whatsoever - so what can they possibly add for the reasonings. Worse, they distract.
Is there a way/workflow for me to work toward a deletion of the mentioning of these two resources?
Of course someone may have put thought into this. Possibly so, I do not know (I am new here). That’s ok.
Thank you.
Volker Glave