java.lang.UnsupportedOperationException: Can not add the same measure twice on

Sonarqube 10.6-community
Installed with Docker
Used with sonarsource/sonar-scanner-cli:latest

java.lang.UnsupportedOperationException: Can not add the same measure twice on developer-maintain-controller/src/main/resources/application.yml: DefaultMeasure[component=developer-maintain-controller/src/main/resources/application.yml,fromCore=false,metric=Metric[uuid=<null>,key=ncloc_data,description=<null>,type=DATA,direction=0,domain=<null>,name=ncloc_data,qualitative=false,userManaged=false,enabled=true,worstValue=<null>,bestValue=<null>,optimizedBestValue=false,hidden=false,deleteHistoricalData=false,decimalScale=<null>],value=1=1;2=1;3=1,saved=false,storage=org.sonar.scanner.sensor.DefaultSensorStorage@6bd74e67]

	at org.sonar.scanner.sensor.DefaultSensorStorage.saveMeasure(DefaultSensorStorage.java:178)

	at org.sonar.scanner.sensor.DefaultSensorStorage.store(DefaultSensorStorage.java:138)

	at org.sonar.api.batch.sensor.measure.internal.DefaultMeasure.doSave(DefaultMeasure.java:96)

	at org.sonar.api.batch.sensor.internal.DefaultStorable.save(DefaultStorable.java:45)

	at org.sonar.scanner.DefaultFileLinesContext.save(DefaultFileLinesContext.java:97)

	at com.github.sbaudoin.sonar.plugins.yaml.linecounter.LineCounter.saveMeasures(LineCounter.java:78)

	at com.github.sbaudoin.sonar.plugins.yaml.linecounter.LineCounter.analyse(LineCounter.java:56)

	at com.github.sbaudoin.sonar.plugins.yaml.rules.YamlSensor.computeLinesMeasures(YamlSensor.java:158)

	at com.github.sbaudoin.sonar.plugins.yaml.rules.YamlSensor.execute(YamlSensor.java:119)

	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)

	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)

	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:61)

	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)

	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:61)

	at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)

	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)

	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)

	at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:204)

	at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:200)

	at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:173)

	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)

	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)

	at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:351)

	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)

	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)

	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144)

	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)

	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)

	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)

	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)

	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)

	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

	at java.base/java.lang.reflect.Method.invoke(Method.java:568)

	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)

	at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)

	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)

	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)

	at org.sonarsource.scanner.cli.Main.execute(Main.java:126)

	at org.sonarsource.scanner.cli.Main.execute(Main.java:81)

	at org.sonarsource.scanner.cli.Main.main(Main.java:62)



INFO: ------------------------------------------------------------------------

INFO: EXECUTION FAILURE

INFO: ------------------------------------------------------------------------

INFO: Total time: 23.750s

INFO: Final Memory: 27M/114M

INFO: ------------------------------------------------------------------------

ERROR: Error during SonarScanner execution

java.lang.UnsupportedOperationException: Trying to save highlighting twice for the same file is not supported: developer-maintain-controller/src/main/resources/application.yml

	at org.sonar.scanner.sensor.DefaultSensorStorage.store(DefaultSensorStorage.java:300)

	at org.sonar.api.batch.sensor.highlighting.internal.DefaultHighlighting.doSave(DefaultHighlighting.java:109)

	at org.sonar.api.batch.sensor.internal.DefaultStorable.save(DefaultStorable.java:45)

	at com.github.sbaudoin.sonar.plugins.yaml.rules.YamlSensor.saveSyntaxHighlighting(YamlSensor.java:314)

	at com.github.sbaudoin.sonar.plugins.yaml.rules.YamlSensor.execute(YamlSensor.java:120)

	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)

	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)

	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:61)

	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)

	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:61)

	at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)

	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)

	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)

	at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:204)

	at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:200)

	at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:173)

	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)

	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)

	at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:351)

	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)

	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)

	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144)

	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)

	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)

	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)

	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)

	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)

	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

	at java.base/java.lang.reflect.Method.invoke(Method.java:568)

	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)

	at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)

	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)

	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)

	at org.sonarsource.scanner.cli.Main.execute(Main.java:126)

	at org.sonarsource.scanner.cli.Main.execute(Main.java:81)

	at org.sonarsource.scanner.cli.Main.main(Main.java:62)

ERROR: 

ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

Hey there.

It looks like the issue is on the community-supported GitHub - sbaudoin/sonar-yaml: SonarQube plugin to analyze YAML files. You should raise an issue on their Github repo.

OK,THX