LGTM.com - Python: An assert statement has a side-effect - false positive
- 主要言語
- CodeQL
- スター
- 10.1k
- フォーク
- 2.1k
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 141
説明
**Description of the false positive**
Having an `assert` statement in the source code with a side effect may indeed be worth flagging however when `assert` is used in a test module, this warning provides very little value. I am not sure whether you distinguish between the source and the test modules (maybe CodeQL for Python is already aware of some patterns such as `"*_test.py"` or `"test_*.py"`), but I believe this warning shouldn't be reported for test modules as it's very common to have statements with side effects in the `assert` statements.
**URL to the alert on the project page on LGTM.com**
https://lgtm.com/projects/g/pantsbuild/pants/snapshot/641563353647f48959728c5b533965e96e6c0a79/files/src/python/pants/util/ordered_set_test.py#x7afc7f96139416c1:1
コントリビューションガイド
評価
この issue はまだ評価されていません。