Template for a good false-positive report, formatted with Markdown:
- versions used (SonarQube, Scanner, language analyzer)
- minimal code sample to reproduce (with analysis parameter, and potential instructions to compile).
Wrap code around triple quote ``` for proper formatting
SonarQube version used: 6.2
a_list = [1, 2, 3, 4] next((val for val in a_list if a%5==0), None)
For the above code sample, you need the generator to be inside parentheses since we are also adding a default value (None).
a = [1, 2, 3] def a_func(): return (list(val) for val in a)
Trying to generate a genexpr for a list with some criteria.