detekt / sonar-detekt

SonarQube plugin for Kotlin
https://detekt.dev
GNU Lesser General Public License v3.0
493 stars 52 forks source link

test assert error #164

Closed BiaoWu closed 1 year ago

BiaoWu commented 1 year ago

just run mvn test , no test run

[INFO] Scanning for projects...
[INFO] 
[INFO] -------------------< io.github.detekt:sonar-detekt >--------------------
[INFO] Building sonar-detekt 2.5.0
[INFO] ----------------------------[ sonar-plugin ]----------------------------
[INFO] 
[INFO] --- sonar-packaging-maven-plugin:1.20.0.405:check (default-check) @ sonar-detekt ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.7:prepare-agent (default) @ sonar-detekt ---
[INFO] argLine set to -javaagent:/Users/biaowu/.m2/repository/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=/Users/biaowu/mine/samples/android/sonar-kotlin/target/jacoco.exec
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ sonar-detekt ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Using 'null' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory /Users/biaowu/mine/samples/android/sonar-kotlin/src/main/resources
[INFO] 
[INFO] --- kotlin-maven-plugin:1.6.10:compile (compile) @ sonar-detekt ---
[WARNING] Using experimental Kotlin incremental compilation
[INFO] Compiled 0 Kotlin files using incremental compiler
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (java-compile) @ sonar-detekt ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ sonar-detekt ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Using 'null' encoding to copy filtered properties files.
[INFO] Copying 9 resources
[INFO] 
[INFO] --- kotlin-maven-plugin:1.6.10:test-compile (test-compile) @ sonar-detekt ---
[WARNING] Using experimental Kotlin incremental compilation
[INFO] Kotlin compile iteration: /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/kotlin/io/gitlab/arturbosch/detekt/sonar/sensor/DetektSensorSpec.kt
[INFO] Exit code: OK
[INFO] Compiled 1 Kotlin files using incremental compiler
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (java-test-compile) @ sonar-detekt ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] 
[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ sonar-detekt ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.7:report (report) @ sonar-detekt ---
[INFO] Loading execution data file /Users/biaowu/mine/samples/android/sonar-kotlin/target/jacoco.exec
[INFO] Analyzed bundle 'sonar-detekt' with 24 classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  7.630 s
[INFO] Finished at: 2023-05-10T16:22:24+08:00
[INFO] ------------------------------------------------------------------------

Process finished with exit code 0

when add a sample test, found this error

[INFO] Scanning for projects...
[INFO] 
[INFO] -------------------< io.github.detekt:sonar-detekt >--------------------
[INFO] Building sonar-detekt 2.5.0
[INFO] ----------------------------[ sonar-plugin ]----------------------------
[INFO] 
[INFO] --- sonar-packaging-maven-plugin:1.20.0.405:check (default-check) @ sonar-detekt ---
[INFO] 
[INFO] --- jacoco-maven-plugin:0.8.7:prepare-agent (default) @ sonar-detekt ---
[INFO] argLine set to -javaagent:/Users/biaowu/.m2/repository/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=/Users/biaowu/mine/samples/android/sonar-kotlin/target/jacoco.exec
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ sonar-detekt ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Using 'null' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory /Users/biaowu/mine/samples/android/sonar-kotlin/src/main/resources
[INFO] 
[INFO] --- kotlin-maven-plugin:1.6.10:compile (compile) @ sonar-detekt ---
[WARNING] Using experimental Kotlin incremental compilation
[INFO] Compiled 0 Kotlin files using incremental compiler
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (java-compile) @ sonar-detekt ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ sonar-detekt ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Using 'null' encoding to copy filtered properties files.
[INFO] Copying 9 resources
[INFO] 
[INFO] --- kotlin-maven-plugin:1.6.10:test-compile (test-compile) @ sonar-detekt ---
[WARNING] Using experimental Kotlin incremental compilation
[INFO] Kotlin compile iteration: /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/kotlin/io/gitlab/arturbosch/detekt/sonar/sensor/DetektSensorSpec.kt
[INFO] Exit code: OK
[INFO] Compiled 1 Kotlin files using incremental compiler
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (java-test-compile) @ sonar-detekt ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] 
[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ sonar-detekt ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running io.gitlab.arturbosch.detekt.sonar.rules.DetektRuleKeySpec
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.906 s - in io.gitlab.arturbosch.detekt.sonar.rules.DetektRuleKeySpec
[INFO] Running io.gitlab.arturbosch.detekt.sonar.sensor.DetektConfigurationSpec
INFO  Registered config path: detekt-config.yml
INFO  Registered config path: top-detekt-config.yml
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.032 s - in io.gitlab.arturbosch.detekt.sonar.sensor.DetektConfigurationSpec
[INFO] Running io.gitlab.arturbosch.detekt.sonar.sensor.DetektSensorSpec
empty-blocks - 10min debt
    EmptyDefaultConstructor - [KotlinFile] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/KotlinFile.kt:5:25
    EmptyClassBlock - [KotlinFile] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/KotlinFile.kt:7:3
formatting - 1h 25min debt
    SpacingAroundParens - [] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/KotlinFile.kt:5:26
    NoEmptyClassBody - [] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/KotlinFile.kt:7:3
    NoBlankLineBeforeRbrace - [] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/KotlinFile.kt:8:1
    Indentation - [] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/a/AClassOne.kt:12:1
    Indentation - [] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/a/AClassOne.kt:13:1
    Indentation - [] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/a/AClassOne.kt:15:1
    NoBlankLineBeforeRbrace - [] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/a/AClassOne.kt:16:1
    SpacingAroundColon - [] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/a/AClassOne.kt:15:20
    NoBlankLineBeforeRbrace - [] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BObjectOne.kt:10:1
    Indentation - [] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BObjectOne.kt:8:1
    Indentation - [] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BObjectOne.kt:9:1
    NoBlankLineBeforeRbrace - [] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BClassTwo.kt:11:1
    Indentation - [] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BClassTwo.kt:8:1
    Indentation - [] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BClassTwo.kt:9:1
    Indentation - [] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BClassTwo.kt:10:1
    NoBlankLineBeforeRbrace - [] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BClassOne.kt:11:1
    Indentation - [] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BClassOne.kt:10:1
style - 25min debt
    FunctionOnlyReturningConstant - [f] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/KotlinFile.kt:11:5
    UnusedPrivateClass - [KotlinFile] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/KotlinFile.kt:5:1
    UnusedPrivateMember - [JUST_A_CONST] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/KotlinFile.kt:3:1
    UtilityClassWithPublicConstructor - [BClassTwo] at /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BClassTwo.kt:3:1

Overall debt: 2h

INFO  RuleSet: empty-blocks - 2
INFO  RuleSet: formatting - 17
INFO  No file found for /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/a/AClassOne.kt
INFO  No file found for /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/a/AClassOne.kt
INFO  No file found for /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/a/AClassOne.kt
INFO  No file found for /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/a/AClassOne.kt
INFO  No file found for /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/a/AClassOne.kt
INFO  No file found for /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BObjectOne.kt
INFO  No file found for /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BObjectOne.kt
INFO  No file found for /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BObjectOne.kt
INFO  No file found for /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BClassTwo.kt
INFO  No file found for /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BClassTwo.kt
INFO  No file found for /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BClassTwo.kt
INFO  No file found for /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BClassTwo.kt
INFO  No file found for /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BClassOne.kt
INFO  No file found for /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BClassOne.kt
INFO  RuleSet: style - 4
INFO  No file found for /Users/biaowu/mine/samples/android/sonar-kotlin/src/test/resources/kotlin/b/BClassTwo.kt
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.594 s <<< FAILURE! - in io.gitlab.arturbosch.detekt.sonar.sensor.DetektSensorSpec
[ERROR] DetektSensorSpec.executes detekt  Time elapsed: 4.589 s  <<< FAILURE!
java.lang.AssertionError: 

Expected size: 7 but was: 8 in:
[DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=EmptyDefaultConstructor, active=true, issue=Issue(id='EmptyDefaultConstructor', severity=Minor, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@181a8d60,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=EmptyClassBlock, active=true, issue=Issue(id='EmptyClassBlock', severity=Minor, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@46688adc,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=SpacingAroundParens, active=true, issue=Issue(id='SpacingAroundParens', severity=Style, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@651463f4,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=NoEmptyClassBody, active=true, issue=Issue(id='NoEmptyClassBody', severity=Style, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@1c35e412,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=NoBlankLineBeforeRbrace, active=true, issue=Issue(id='NoBlankLineBeforeRbrace', severity=Style, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@22b94c63,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=FunctionOnlyReturningConstant, active=true, issue=Issue(id='FunctionOnlyReturningConstant', severity=Style, debt=10min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@425eae93,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=UnusedPrivateClass, active=true, issue=Issue(id='UnusedPrivateClass', severity=Maintainability, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@6a9ed2a8,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=UnusedPrivateMember, active=true, issue=Issue(id='UnusedPrivateMember', severity=Maintainability, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@6ac2bf3e,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true]]
Caused by: java.lang.AssertionError: 

Expected size: 7 but was: 8 in:
[DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=EmptyDefaultConstructor, active=true, issue=Issue(id='EmptyDefaultConstructor', severity=Minor, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@181a8d60,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=EmptyClassBlock, active=true, issue=Issue(id='EmptyClassBlock', severity=Minor, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@46688adc,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=SpacingAroundParens, active=true, issue=Issue(id='SpacingAroundParens', severity=Style, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@651463f4,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=NoEmptyClassBody, active=true, issue=Issue(id='NoEmptyClassBody', severity=Style, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@1c35e412,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=NoBlankLineBeforeRbrace, active=true, issue=Issue(id='NoBlankLineBeforeRbrace', severity=Style, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@22b94c63,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=FunctionOnlyReturningConstant, active=true, issue=Issue(id='FunctionOnlyReturningConstant', severity=Style, debt=10min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@425eae93,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=UnusedPrivateClass, active=true, issue=Issue(id='UnusedPrivateClass', severity=Maintainability, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@6a9ed2a8,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=UnusedPrivateMember, active=true, issue=Issue(id='UnusedPrivateMember', severity=Maintainability, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@6ac2bf3e,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true]]

[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR]   
Expected size: 7 but was: 8 in:
[DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=EmptyDefaultConstructor, active=true, issue=Issue(id='EmptyDefaultConstructor', severity=Minor, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@181a8d60,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=EmptyClassBlock, active=true, issue=Issue(id='EmptyClassBlock', severity=Minor, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@46688adc,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=SpacingAroundParens, active=true, issue=Issue(id='SpacingAroundParens', severity=Style, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@651463f4,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=NoEmptyClassBody, active=true, issue=Issue(id='NoEmptyClassBody', severity=Style, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@1c35e412,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=NoBlankLineBeforeRbrace, active=true, issue=Issue(id='NoBlankLineBeforeRbrace', severity=Style, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@22b94c63,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=FunctionOnlyReturningConstant, active=true, issue=Issue(id='FunctionOnlyReturningConstant', severity=Style, debt=10min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@425eae93,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=UnusedPrivateClass, active=true, issue=Issue(id='UnusedPrivateClass', severity=Maintainability, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@6a9ed2a8,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true],
    DefaultIssue[ruleKey=DetektRuleKey(repositoryKey=sonar-detekt, ruleKey=UnusedPrivateMember, active=true, issue=Issue(id='UnusedPrivateMember', severity=Maintainability, debt=5min)),gap=<null>,overriddenSeverity=<null>,primaryLocation=org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation@6ac2bf3e,flows=[],project=[key=projectKey],storage=org.sonar.api.batch.sensor.internal.InMemorySensorStorage@5aaf3ba,saved=true]]
[INFO] 
[ERROR] Tests run: 8, Failures: 1, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  15.201 s
[INFO] Finished at: 2023-05-10T16:24:52+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project sonar-detekt: There are test failures.
[ERROR] 
[ERROR] Please refer to /Users/biaowu/mine/samples/android/sonar-kotlin/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Process finished with exit code 1