Sonarpython 不扫描 Jupyter 笔记本 .ipynb
Posted
技术标签:
【中文标题】Sonarpython 不扫描 Jupyter 笔记本 .ipynb【英文标题】:Sonarpython not scanning Jupyter notebook .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 上添加了一个设置:
【问题讨论】:
【参考方案1】:如下图所示,在下一行添加 ipynb。
【讨论】:
这实际上并没有真正帮助,因为笔记本文件将被分析为 python 文件,并且分析中会有很多噪音以上是关于Sonarpython 不扫描 Jupyter 笔记本 .ipynb的主要内容,如果未能解决你的问题,请参考以下文章