donhui / sonar-mybatis

MyBatis Plugin for SonarQube: Rules to check SQL statements in MyBatis Mapper XML files
Other
74 stars 21 forks source link

匹配到规则后Background Tasks报错 #23

Open CullenLin opened 4 years ago

CullenLin commented 4 years ago
donhui commented 4 years ago

可能是版本兼容性问题,你用 1.0.5 这个版本试试看下

FalconIA commented 4 years ago

问题复现

SonarQube 8.4.2 MyBatis Plugin for SonarQube 1.0.6 SonarXML 2.0.1 (build 2020)

Caused by: java.lang.IllegalArgumentException: Rule 'MyBatisLint:MyBatisMapperCheckRule1' can not use 'Constant/issue' remediation function because this rule does not have a fixed remediation cost.
    at org.sonar.ce.task.projectanalysis.issue.DebtCalculator.verifyEffortToFix(DebtCalculator.java:70)
    at org.sonar.ce.task.projectanalysis.issue.DebtCalculator.calculate(DebtCalculator.java:49)
    at org.sonar.ce.task.projectanalysis.issue.IssueLifecycle.initNewOpenIssue(IssueLifecycle.java:78)
    at java.base/java.util.stream.ReferencePipeline$11$1.accept(Unknown Source)
    at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
    at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(Unknown Source)
    at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
    at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
    at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
    at org.sonar.ce.task.projectanalysis.issue.IntegrateIssuesVisitor.fillNewOpenIssues(IntegrateIssuesVisitor.java:73)
    at org.sonar.ce.task.projectanalysis.issue.IntegrateIssuesVisitor.visitAny(IntegrateIssuesVisitor.java:60)
    ... 48 more
meetshawn commented 1 year ago

stream

我也有这个问题,有解决方案么