【问题标题】:SonarQube cannot parse Pylint outputSonarQube 无法解析 Pylint 输出
【发布时间】:2021-12-29 13:37:03
【问题描述】:

我正在尝试将 Pylint 分析报告输入 sonarQube。

对声纳扫描仪的调用是:

sonar-scanner -X -Dsonar.python.pylint.reportPath=report.txt ...

其中 report.txt 是 Pylint “香草”输出格式,如下所示:

************* Module src.module.file
src/module/file.py:200:13: W0511: TODO fix it
src/module/file.py:49:0: W0622: Redefining built-in 'ConnectionError' (redefined-builtin)

我得到的只是声纳抱怨:

17:27:39.330 DEBUG: Cannot parse the line: ************* Module src.module.file
17:27:39.330 DEBUG: Cannot parse the line: src/module/file.py:200:13: W0511: TODO fix it
17:27:39.330 DEBUG: Cannot parse the line: src/module/file.py:49:0: W0622: Redefining built-in 'ConnectionError' (redefined-builtin)

我正在使用声纳扫描仪 4.4.0 和 Pylint 2.11.1。

有什么线索吗?

【问题讨论】:

    标签: python sonarqube pylint


    【解决方案1】:

    好吧,原来声纳扫描仪无法解析“香草”Pylint 输出。 如here 所述,Pylint 输出应使用 --output-format=parseable 选项进行格式化。

    【讨论】:

      猜你喜欢
      • 2021-03-24
      • 2021-11-24
      • 1970-01-01
      • 2017-01-07
      • 2020-06-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多