github / github/codeql

False positive py/uninitialized-local-variable

Aberta
#18,390 3 comentários 1 reação 0 responsáveis Ver no GitHub
false-positive Python
Linguagem predominante
CodeQL
Estrelas
10.1k
Forks
2.1k
Merge médio
2d 15h
PRs com merge (30d)
141

Descrição

**Description of the false positive**

**Code samples or links to source code**

```python
class Foo:
def foo(self, a, b, c=0):
start = 0
visible = not (a == b and c)
end = start if visible else None
return end

```

CodeQL Version: 2.18.3

Alert : Local variable 'visible' may be used before it is initialized.

I suspect that the issue is caused by EssaVariable being unable to locate the assignment statement for the variable visible, but I'm not sure how to modify the ql statement.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.