angular - 声纳:检查 node_modules 时 TFS“发布质量门结果”任务失败
问题描述
node_modules
是 yarn(或 npm)存储依赖项的位置。
我正在使用 TFS 任务对具有此标准配置的 angular 7 项目执行 SonarQube 分析:
“发布质量门结果”任务因以下错误而失败:
2019-02-06T16:15:40.1474327Z ##[debug]findPath: 'C:\Agt2\_work\14'
2019-02-06T16:15:40.1474945Z ##[debug]findOptions.followSpecifiedSymbolicLink: 'true'
2019-02-06T16:15:40.1475394Z ##[debug]findOptions.followSymbolicLinks: 'true'
2019-02-06T16:15:40.1480701Z ##[debug] C:\Agt2\_work\14 (directory)
[...]
2019-02-06T16:15:41.2684833Z ##[debug] C:\Agt2\_work\14\s\node_modules\@angular\cli (directory)
2019-02-06T16:15:41.2692225Z ##[debug] C:\Agt2\_work\14\s\node_modules\@angular\cli\.bin (directory)
2019-02-06T16:15:41.2779828Z ##[debug][SQ] Publish task error: Failed find: ENOENT: no such file or directory, stat 'C:\Agt2\_work\14\s\node_modules\@angular\cli\.bin\ng'
2019-02-06T16:15:41.2781059Z ##[debug]task result: Failed
2019-02-06T16:15:41.2782877Z ##[error]Failed find: ENOENT: no such file or directory, stat 'C:\Agt2\_work\14\s\node_modules\@angular\cli\.bin\ng'
第一个问题:为什么声纳分析 node_modules 而我将它添加到“准备分析”任务中的排除文件中:
sonar.exclusions=**/node_modules/**,**/*.spec.ts
第二个问题:如果我将这些选项添加到“准备分析”任务中的附加属性中,似乎忽略了该选项:
findOptions.followSpecifiedSymbolicLink='false'
findOptions.followSymbolicLinks:'false'
以及如何解决此问题以获取单元测试结果并将其发布到 sonarqube ?
编辑:在 Sonar JIRA 上创建的票证: https ://community.sonarsource.com/t/vsts-publish-quality-gate-result-with-npm-parses-node-modules-folder-and-hangs-on-symbolic-链接/7058
编辑 2:声纳团队回答我说它与这个错误相似: https ://jira.sonarsource.com/browse/VSTS-172
解决方案
推荐阅读
- javascript - Kibana 自动登录
- python - DBSCAN scikit python eps 意外
- ssl - 如何在 pfsense 中使用 squid 记录 https 内容?
- python - 如何在 ffill 或 bfill 等浮点列中填充 0.00 值?
- gradle - gradle checkstyle 错误:预期的文件集合只包含一个文件,但是,它包含 14 个文件
- java - 如何从用户界面获取字符串将其放入方法中并将其作为函数返回?
- c - Lwip tcp_write payload pbuf 使用 memcpy 给出不一致的值
- java - 我们可以在默认目录之外的 ftp 服务器上上传文件吗?
- android - Firebase In App Messaging 不断删除显示事件侦听器
- python - 使用线程时如何将变量传递给 Flask 函数?