SonarQube自定义规则不适用于测试文件

时间:2019-02-20 23:51:19

标签: java android maven sonarqube sonarlint

起源问题在这里 https://community.sonarsource.com/t/sonarlint-intergrating-with-sonarqube-with-custom-rules-inconsistencies-java/7078

我已经缩小了问题的范围,是maven-dependency-plugin中的工件,因为有人在这里https://community.sonarsource.com/t/sonar-rule-symbol-and-symboltype-always-unknown/4718/4

SonarLint似乎使用与Sonarqube中运行测试文件相同的过程来实现实时代码检查功能。在通过SonarQube完全扫描android项目时,“正在分析的项目提供了生产环境”,因此SonarQube可以跟踪变量并扫描所有问题。但是,我需要它在测试环境中工作才能与SonarLint兼容。而且我缺少大量的工件依赖项,以使其正常工作。谁能建议我在哪里可以找到这些工件,或者如何构建它们或解决方法?

18:35:54.654 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for javax
18:35:54.654 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for javax.crypto
18:35:54.666 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for StringBuilder
18:35:54.666 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for java.lang.package-info
18:35:54.666 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for java.lang.Synthetic$StringBuilder
18:35:54.666 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for String
18:35:54.666 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for java.lang.Synthetic$String
18:35:54.666 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for String
18:35:54.667 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for java.lang.Synthetic$String
18:35:54.667 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for SharedPreferences
18:35:54.667 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for java.lang.SharedPreferences
18:35:54.667 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for java.lang.Synthetic$SharedPreferences
18:35:54.667 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for StringBuilder
18:35:54.667 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for java.lang.Synthetic$StringBuilder
18:35:54.668 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for Constants
18:35:54.668 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for java.lang.Constants
18:35:54.668 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for java.lang.Synthetic$Constants
18:35:54.668 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for Context
18:35:54.668 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for java.lang.Context
18:35:54.668 [main] DEBUG o.s.j.b.loader.SquidClassLoader - .class not found for java.lang.Synthetic$Context

0 个答案:

没有答案