Hi, SonarScanner 4.8.0.2856
Our short-lived branch is failing by showing some warnings:
[2023-05-23T05:41:50.251Z] WARN: File '/opt/workDir/*service.spec.ts' was detected as changed but without having changed lines
[2023-05-23T05:41:50.251Z] WARN: File '/opt/workDir/*.spec.ts' was detected as changed but without having changed lines
[2023-05-23T05:41:50.251Z] WARN: File '/opt/workDir/*component.ts' was detected as changed but without having changed lines
[2023-05-23T05:41:57.456Z] INFO: Time spent writing ucfgs 0ms
[2023-05-23T05:41:57.456Z] INFO: ------------------------------------------------------------------------
[2023-05-23T05:41:57.456Z] INFO: EXECUTION FAILURE
[2023-05-23T05:41:57.456Z] INFO: ------------------------------------------------------------------------
[2023-05-23T05:41:57.456Z] INFO: Total time: 4:11.506s
[2023-05-23T05:41:57.456Z] INFO: Final Memory: 55M/220M
[2023-05-23T05:41:57.456Z] INFO: ------------------------------------------------------------------------
[2023-05-23T05:41:57.456Z] ERROR: Error during SonarScanner execution
[2023-05-23T05:41:57.456Z] java.lang.UnsupportedOperationException
[2023-05-23T05:41:57.456Z] at java.base/java.util.AbstractCollection.add(AbstractCollection.java:267)
[2023-05-23T05:41:57.456Z] at org.sonar.scanner.report.ChangedLinesPublisher.writeChangedLines(ChangedLinesPublisher.java:93)
[2023-05-23T05:41:57.456Z] at org.sonar.scanner.report.ChangedLinesPublisher.publish(ChangedLinesPublisher.java:65)
Hi @Colin
One more point is, i see dev excluded some files patterns using sonar.exclusions
And in the warning message i can see same pattern of suffix. Example: *.spec.ts is excluded and some file with the name example.spec.ts is showing as detected as changed but without having changed lines
Lot of confusions @Colin Scenario:1
If i create branch with the name 1234-builds, getting above warnings and build failing
If i change it to -1234-build build got success.
Scenario:2
If My Branch name contains ‘_’ like ABC_12-Test_Build failing with same issues.
If I remove uderscore from branch names like ABC-12-Test-Build build success.
We are currently trying to reproduce your issue locally to see if we can find where the error is occurring.
Scenario:1
If i create branch with the name 1234-builds, getting above warnings and build failing
If i change it to -1234-build build got success.
Scenario:2
If My Branch name contains ‘_’ like ABC_12-Test_Build failing with same issues.
If I remove uderscore from branch names like ABC-12-Test-Build build success.
You previously mentioned these two scenarios to us. Could you please confirm how Scenario 1 is working? For example is it ‘- 1234-builds’? Or is it related to the build vs. builds name.
Also could I confirm which languages you are running the test with? I see TS files in your above example, however are you also including others?
It is not related to build vs builds name @shane.findley Scenario:1
If i create branch with the name 1234-build, getting above warnings and build failing
If i change it to <LonglivedBranchPattern>-1234-build build got success.