问题描述
我正在尝试使用 SonarQube 扫描我拥有的 UI 模块.UI 模块的数量很多.它们具有共同的结构.每个模块都有自己的 JS 文件.
I am trying to use SonarQube to scan the UI modules I have. The UI modules are lot in number. They have a common structure. Each module has its own JS files.
我需要指定 sonar.sources 值来匹配我项目中的所有 JS 文件.有可能做这样的事情吗?
I need to specify the sonar.sources value to match all JS files in my project. Is it possible to do something like this?
sonar.sources=*/*/script
sonar.language=js
我用过这些.但是,我收到一条错误消息,例如 无法解析路径".有人可以帮忙吗?
I used these. But, I got an error saying something like "unable to resolve path". Can someone help?
推荐答案
尝试使用通配符:
* Match zero or more characters
** Match zero or more directories
? Match a single character
像这样:
sonar.sources=**/script
更新
截至 2019 年,sonar.sources 参数不支持此类 glob 模式.通常的做法是将此值设置为包含源代码的目录 列表.扫描器将遍历目录树并运行适用的分析器(JavaScript 分析器将使用 .js 文件,Python 分析器将使用 .py 文件,依此类推.)
As of 2019, the sonar.sources parameter doesn't support such glob patterns. The common practice is to set this value to a list of directories that contain source code. The scanner will find traverse the directory trees and run applicable analyzers (JavaScript analyzers will consume .js files, Python analyzers will consume .py files, and so on.)
这篇关于如何在 sonar-project.properties 中指定通配符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!



大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)