gpt4 book ai didi

java - Sonarqube 6.2 错误 - 无法完成符号执行 : reached limit of 16000 steps

转载 作者:太空宇宙 更新时间:2023-11-04 11:49:50 29 4
gpt4 key购买 nike

我使用 Sonarqube 6.2 和版本 4.4.0.8066 的 sonar java 插件,并在使用 JDK 1.8 编译的项目上遇到此错误:

[DEBUG] 22:09:01.566 Could not complete symbolic execution: 
22:09:01 org.sonar.java.se.ExplodedGraphWalker$MaximumStepsReachedException: reached limit of 16000 steps for method setData#198 in class PaymentVarianceReportFilterCriteria
22:09:01 at org.sonar.java.se.ExplodedGraphWalker.throwMaxSteps(ExplodedGraphWalker.java:260)
22:09:01 at org.sonar.java.se.ExplodedGraphWalker.execute(ExplodedGraphWalker.java:211)
22:09:01 at org.sonar.java.se.ExplodedGraphWalker.visitMethod(ExplodedGraphWalker.java:186)
22:09:01 at org.sonar.java.se.SymbolicExecutionVisitor.execute(SymbolicExecutionVisitor.java:68)
22:09:01 at org.sonar.java.se.SymbolicExecutionVisitor.visitNode(SymbolicExecutionVisitor.java:57)
22:09:01 at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:95)
22:09:01 at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:120)
22:09:01 at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:97)
22:09:01 at org.sonar.java.ast.visitors.SubscriptionVisitor.visitChildren(SubscriptionVisitor.java:120)
22:09:01 at org.sonar.java.ast.visitors.SubscriptionVisitor.visit(SubscriptionVisitor.java:97)
22:09:01 at org.sonar.java.ast.visitors.SubscriptionVisitor.scanTree(SubscriptionVisitor.java:78)
22:09:01 at org.sonar.java.ast.visitors.SubscriptionVisitor.scanFile(SubscriptionVisitor.java

.................
........................

....................
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar (default-cli) on project ct: Error 500 on http://stssonar01/api/ce/submit?projectKey=com.edifecs:ct&projectName=Edifecs%20Collaborative%20Testing%20Build : {"errors":[{"msg":"An error has occurred. Please contact your administrator."}]} -> [Help 1]
22:50:07 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar (default-cli) on project ct: Error 500 on http://stssonar01/api/ce/submit?projectKey=com.edifecs:ct&projectName=Edifecs%20Collaborative%20Testing%20Build : {"errors":[{"msg":"An error has occurred. Please contact your administrator."}]}
22:50:07 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
22:50:07 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)

在运行 maven 构建过程的 sonar:sonar 步骤时,我是否遗漏了一些东西 clean install sonar:sonar

请帮助我摆脱困境。提前致谢..

最佳答案

这与符号执行引入的负面测试有关。

对于两条规则(关于空指针异常的 S2259 和关于条件始终为真或假的 S2583),执行此测试。

本质上,在该方法中存在一个点,即 null/始终为 true 或 false 的所有可能性的总数迭代超过 6000。

您可以禁用这两个规则,或者重构该方法以使其中没有那么多 if/case 逻辑。

这对于 ( https://jira.sonarsource.com/browse/SONARJAVA-1406 ) 来说应该是非侵入性的,并且只能在 Debug模式下渲染,但是我可以确认它仍然会停止使用 Maven 插件进行读取。

关于java - Sonarqube 6.2 错误 - 无法完成符号执行 : reached limit of 16000 steps,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41952864/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com