Dear all,
Going through the Codacy logs and trying to filter out background noise I have come across two similar code patterns that are generating a fair number of issues:
1)
Variable 'var' is reassigned a value before the old one has been used.
2)
Variable 'varname' is assigned a value that is never used.
Often these unused variable values are of the type “status” or “counter” and may be useful for debugging.
In some code standards these patterns are banned. But my gut feeling is that we do not want to enforce that, hence I would propose we remove these rules for Codacy. Any opinions on this topic?
Karl Vestin
Group Leader Hardware and Integration
Integrated Control Systems Division
European Spallation Source ERIC
+46721792066
P.O Box 176, SE 221 00 Lund, Sweden
Visiting address: Odarslövsvägen 113, Lund