【问题标题】:Sonarpython not scanning Jupyter notebook .ipynbSonarpython 不扫描 Jupyter 笔记本 .ipynb
【发布时间】:2019-06-17 15:17:13
【问题描述】:

我正在使用 Sonarqube 扫描我的 GIT 存储库,并安装了一个名为“SonarPython”的插件。

它会扫描所有 python 文件 (.py),但不会拾取任何带有扩展名 (.ipynb) 的 jupyter notebook。

这是扫描 jupyter notebook 的正确插件吗?有没有其他方法可以在 SonarPython 中扫描 jupyter notebook

我的声纳项目文件

# must be unique in a given SonarQube instance
sonar.projectKey=Python:KeyValueeeeeee
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
sonar.projectName=Myproject
sonar.projectVersion=1.0

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# This property is optional if sonar.modules is set. 
sonar.sources=./

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8 

甚至在 Sonarqube 上添加了一个设置:

【问题讨论】:

    标签: python sonarqube jupyter-notebook sonarqube-scan


    【解决方案1】:

    如下图所示,在下一行添加 ipynb。

    【讨论】:

    • 这实际上并没有真正帮助,因为笔记本文件将被分析为 python 文件,并且分析中会有很多噪音
    猜你喜欢
    • 2015-05-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-26
    • 2022-06-13
    • 1970-01-01
    • 1970-01-01
    • 2018-01-13
    相关资源
    最近更新 更多