ecoCode icon indicating copy to clipboard operation
ecoCode copied to clipboard

[EC63] [Java] Rule "The variable exception is not assigned" irrelevant ?

Open dedece35 opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. The java rule The variable exception is not assigned with id cnumr-java:S63 isn't really "good" for our society becasue the argument to change delete the variable is not relevant. try-catch statement in Java language use a temporary variable in catchstatement. Please see followed captures : variableNotAssigned-1 variableNotAssigned-2 variableNotAssigned-3

Describe the solution you'd like

  • for the moment, this rule is disabled in our SonarQube
  • check why this rule is relevant in our plugin

what is your point of view @glalloue, @jules-delecour-dav, @jhertout, @olegoaer, @mdubois81 ?

dedece35 avatar Jan 27 '23 21:01 dedece35

For this case, since we are forced to do that because of the language itself, maybe we should:

  • ignore the "try catch" case for this rule.
  • create a specific rule for the "try catch" case ? (to be able to deactivate only this case if we want)

jhertout avatar Jan 30 '23 06:01 jhertout

new rule ID : EC63

dedece35 avatar Aug 25 '23 14:08 dedece35