0
某些背景: 我正在使用小/僞pom.xml來促進SonarQube分析Python3源代碼。所有Python3源文件觸發此SonarQube錯誤...SonarQube分析報告所有Python3源文件的錯誤「無法解析文件」
樣的錯誤信息(文件的完整的源代碼):
[ERROR] [23:13:30.135] Unable to parse file: /home/kca/saveme2/git/kevinarpe-rambutan3/rambutan3/RTestUtil.py
[ERROR] [23:13:30.135] Parse error at line 3 column 33:
--> def test_eq_and_ne(left, right, *, is_equal: bool):
4: assert is_equal == (left == right)
5: assert is_equal != (left != right)
6:
7:
8:
9: EOF
上面的錯誤似乎抱怨Python3函數參數招給力調用者按名稱指定參數。
爲了準確再現,請做這個回購的git克隆(https://github.com/kevinarpe/kevinarpe-rambutan3)並運行./sonarqube.bash
(小腳本來設置env並運行mvn sonar:sonar
)。
也許這是一個pylint問題或環境問題(在我這邊)。我從Debian GNU/Linux中運行。
哇...我對SonarQube JIRA一個「重大」漏洞榮幸。^..^Huzah! – kevinarpe
如何報告類似的錯誤? python3語法也有type-hinting問題 – JackLeo
@JackLeo錯誤應該報告給[sonarqube google group](https://groups.google.com/forum/#!forum/sonarqube)。 –