How to specify wildcards in sonar-project.properties(如何在 sonar-project.properties 中指定通配符)
问题描述
我正在尝试使用 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 中指定通配符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 sonar-project.properties 中指定通配符


基础教程推荐
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
- 每次设置弹出窗口的焦点 2022-01-01
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01