- versions used
Sonar Could for Azure DevOps pull request - Code:
style = "style = 'background-color : pink;'" #SonarCloud alert: Remove the unused local variable "style". key_name = k.replace("_", "\\_") #SonarCloud alert: Remove the unused local variable "key_name". body_text += f'''<tr {style if Counter(v.values()).get('FAIL', 0) != 0 else ''}><td>{key_name}</td><td>{Counter(v.values()).get('PASS', 0)}</td><td>{Counter(v.values()).get('FAIL', 0)}</td></tr>'''
The variable “style” and “key_name” are used in the f-string (body_text) but still get this error and block the PR