Unused local variables should be removed and min()/max()


Python scanner ( detects unused local variables accumulated with operators like +=, but failed on variables accumulated with min()/max() (or may be other functions without side effects):

max_value = 0.0
avg_value = 0.0
for value_tag in value_tags:
     value = get_value(value_tag) # arbitrary source of data
     max_value = max(max_value, value)
     avg_value += voltage

Hey there.

Are you using SonarCloud or SonarQube (if the latter, what version?)

Hi, Colin!

We use SonarQube Developer Edition Version 9.4 (build 54424).