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 中指定通配符


- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- Fetch API 如何获取响应体? 2022-01-01
- 失败的 Canvas 360 jquery 插件 2022-01-01
- addEventListener 在 IE 11 中不起作用 2022-01-01
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- 400或500级别的HTTP响应 2022-01-01
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01