Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metric 'files' should not be computed by a sensor #212

Closed
LiohAu opened this issue Mar 27, 2019 · 29 comments
Closed

Metric 'files' should not be computed by a sensor #212

LiohAu opened this issue Mar 27, 2019 · 29 comments
Labels

Comments

@LiohAu
Copy link

LiohAu commented Mar 27, 2019

Describe the bug
When running run-sonar-swift.sh, I get an error during the sonar-runner phase.
If I run the sonar-runner alone (with -X option), I get the following java call stack.
I guess the plugin is not compatible with SonarQube 7.7, but maybe it is only the saveMeasures of SwiftSquidSensor to update ?

Screenshots

15:23:31.805 ERROR: Error during SonarQube Scanner execution
java.lang.UnsupportedOperationException: Metric 'files' should not be computed by a Sensor
	at org.sonar.scanner.sensor.DefaultSensorStorage.saveMeasure(DefaultSensorStorage.java:168)
	at org.sonar.scanner.sensor.DefaultSensorStorage.store(DefaultSensorStorage.java:132)
	at org.sonar.api.batch.sensor.measure.internal.DefaultMeasure.doSave(DefaultMeasure.java:95)
	at org.sonar.api.batch.sensor.internal.DefaultStorable.save(DefaultStorable.java:45)
	at com.backelite.sonarqube.commons.MeasureUtil.saveMeasure(MeasureUtil.java:34)
	at com.backelite.sonarqube.swift.SwiftSquidSensor.saveMeasures(SwiftSquidSensor.java:85)
	at com.backelite.sonarqube.swift.SwiftSquidSensor.save(SwiftSquidSensor.java:79)
	at com.backelite.sonarqube.swift.SwiftSquidSensor.execute(SwiftSquidSensor.java:141)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:359)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:354)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:317)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:185)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:111)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)

SonarQube environment:

  • OS: MacOS
  • Version : 7.7
  • Sonar-Scanner v3.3.0.1492
@andrew-skrypnyk
Copy link

andrew-skrypnyk commented Mar 28, 2019

same problem there

INFO: SonarQube Scanner 3.3.0.1492
INFO: Java 11.0.2 Oracle Corporation (64-bit)
INFO: Mac OS X 10.14.3 x86_64

hope for a sooner update

@meyyappanv
Copy link

Same issue here

INFO: SonarQube Scanner 3.2.0.1227
INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
INFO: Linux 4.15.0-45-generic amd64
INFO: SonarQube server 7.7.0

@diep-crystal
Copy link

Same issue,
INFO: SonarQube Scanner 3.3.0.1492
INFO: Java 1.8.0_202 Oracle Corporation (64-bit)
INFO: Mac OS X 10.14.4 x86_64
INFO: SonarQube server 7.7.0

Hope having update soon

@giteshgawade
Copy link

Same Issue, hope to have an update soon..

INFO: SonarQube Scanner 3.3.0.1492
INFO: Java 1.8.0_201 Oracle Corporation (64-bit)
INFO: Mac OS X 10.13.6 x86_64
INFO: SonarQube server 7.7.0

@marciomyst
Copy link

Same Issue here

INFO: SonarQube Scanner 3.3.0.1492
INFO: Java 1.8.0_181 Oracle Corporation (64-bit)
INFO: Mac OS X 10.13.6 x86_64
INFO: SonarQube server 7.4.0

@promlife
Copy link

Same Issue

INFO: SonarQube Scanner 3.3.0.1492
INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
INFO: Mac OS X 10.13.6 x86_64
INFO: SonarQube server 7.7.0

@jpiechowka
Copy link

jpiechowka commented Apr 12, 2019

I have the same issue

INFO: SonarQube Scanner 3.3.0.1492
INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
INFO: Mac OS X 10.14.4 x86_64
INFO: SonarQube server 7.7.0

Workaround:
Ok so the fastest way to get it working is to delete or comment out line with SwiftMetric.FILES in SwiftSquidSensor.java and ObjectiveCMetric.FILES in ObjectiveCSquidSensor.java. Then it is easy to build the jar file with mvn clean install and replace the old plugin in SonarQube plugins directory.

@andre-bahia
Copy link

Same Issue here

INFO: SonarQube Scanner 3.3.0.1492
INFO: Java 1.8.0_181 Oracle Corporation (64-bit)
INFO: Mac OS X 10.13.6 x86_64
INFO: SonarQube server 7.4.0

@etby
Copy link

etby commented Apr 18, 2019

Same Issue here

INFO: SonarQube Scanner 3.3.0.1492
INFO: Java 1.8.0_202 Oracle Corporation (64-bit)
INFO: Mac OS X 10.14.4 x86_64
INFO: SonarQube server 7.7.0

@promlife
Copy link

I have the same issue

INFO: SonarQube Scanner 3.3.0.1492
INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
INFO: Mac OS X 10.14.4 x86_64
INFO: SonarQube server 7.7.0

Workaround:
Ok so the fastest way to get it working is to delete or comment out line with SwiftMetric.FILES in SwiftSquidSensor.java and ObjectiveCMetric.FILES in ObjectiveCSquidSensor.java. Then it is easy to build the jar file with mvn clean install and replace the old plugin in SonarQube plugins directory.

we have soled the problem according to the Workaround replyed by jpiechowka

@onmyway133
Copy link

Here's how to work around this issues, together with many other tips onmyway133/blog#216

@paicolman
Copy link

Did the changes proposed by onmyway133 but get the same error...

@kaleemasadmughal
Copy link

Facing Same issue.
Running SonarQube using SonarQube Runner.ERROR: Error during SonarQube Scanner execution
ERROR: Metric 'files' should not be computed by a Sensor
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
ERROR - Command 'sonar-scanner ' failed with error code: 1

@yan-braslavsky
Copy link

yan-braslavsky commented May 15, 2019

Absolutely same here.

java.lang.UnsupportedOperationException: Metric 'files' should not be computed by a Sensor
	at org.sonar.scanner.sensor.DefaultSensorStorage.saveMeasure(DefaultSensorStorage.java:168)
	at org.sonar.scanner.sensor.DefaultSensorStorage.store(DefaultSensorStorage.java:132)
	at org.sonar.api.batch.sensor.measure.internal.DefaultMeasure.doSave(DefaultMeasure.java:95)
	at org.sonar.api.batch.sensor.internal.DefaultStorable.save(DefaultStorable.java:45)
	at com.backelite.sonarqube.commons.MeasureUtil.saveMeasure(MeasureUtil.java:34)
	at com.backelite.sonarqube.swift.SwiftSquidSensor.saveMeasures(SwiftSquidSensor.java:85)
	at com.backelite.sonarqube.swift.SwiftSquidSensor.save(SwiftSquidSensor.java:79)
	at com.backelite.sonarqube.swift.SwiftSquidSensor.execute(SwiftSquidSensor.java:141)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:359)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:354)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:317)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	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:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:185)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:111)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)```

@yan-braslavsky
Copy link

I have followed the suggestion from @jpiechowka and recompiled the source code of the plugin with the lines commented out. Now I get a new error :/

java.lang.IllegalStateException: Line number must be strictly positive: 0
	at org.sonar.api.internal.google.common.base.Preconditions.checkState(Preconditions.java:197)
	at org.sonar.api.batch.sensor.coverage.internal.DefaultCoverage.validateLine(DefaultCoverage.java:94)
	at org.sonar.api.batch.sensor.coverage.internal.DefaultCoverage.lineHits(DefaultCoverage.java:81)
	at com.backelite.sonarqube.swift.coverage.CoberturaReportParser.collectFileData(CoberturaReportParser.java:109)
	at com.backelite.sonarqube.swift.coverage.CoberturaReportParser.collectClassMeasures(CoberturaReportParser.java:91)
	at com.backelite.sonarqube.swift.coverage.CoberturaReportParser.collectPackageMeasures(CoberturaReportParser.java:79)
	at com.backelite.sonarqube.swift.coverage.CoberturaReportParser.parseReport(CoberturaReportParser.java:61)
	at com.backelite.sonarqube.swift.coverage.CoberturaSensor.execute(CoberturaSensor.java:69)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:359)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:354)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:317)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	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:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:185)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:111)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)

@silverhammermba
Copy link

The patch worked for me. Note that you have to remove FILES and LINES metrics for both Swift and Objective-C. So four lines need to be removed.

ghost pushed a commit to volvogroup-mobility/sonar-swift that referenced this issue May 23, 2019
ghost pushed a commit to volvogroup-mobility/sonar-swift that referenced this issue May 23, 2019
* 0.4.4-volvo:
  Fixed "ERROR: Metric 'files' should not be computed by a Sensor". Issue: Idean#212. PR: Idean#213

# Conflicts:
#	commons/pom.xml
#	objclang/pom.xml
#	objclang/src/main/java/com/backelite/sonarqube/objectivec/ObjectiveCSquidSensor.java
#	pom.xml
#	sonar-swift-plugin/pom.xml
#	swiftlang/pom.xml
#	swiftlang/src/main/java/com/backelite/sonarqube/swift/SwiftSquidSensor.java
@garyodonoghue
Copy link

garyodonoghue commented Jul 10, 2019

@ivelius
I think your issue with line numbers is related to this issue:
cobertura/cobertura#288

Removing those entries with number="0" in my cobertura report xml file allowed me to upload to sonar, but i dont know why they're being generated in the first place :/

@kanakaraju043
Copy link

Same Issue here

INFO: sonar-scanner-4.0.0.1744-macosx
INFO: jdk-11.0.4_osx-x64_bin
INFO: Mac OS X 10.14.5 x86_64
INFO: sonarqube-7.9.1

@nascimentorafael
Copy link

Same isse here
INFO: sonar-scanner-cli-4.0.0.1744-macosx
INFO: 12.0.2, x86_64: "Java SE 12.0.2"
INFO: Mac OS 10.14.5
INFO: sonarqube-developer-7.9.1

@umanglahane
Copy link

Facing same issue
INFO: Mac OS X 10.13.6
INFO: SonarQube 7.9.1
INFO: sonar-scanner-4.0.0.1744-macosx
INFO: Java 12.0.2

@nascimentorafael
Copy link

nascimentorafael commented Jul 31, 2019

I could fix this issue with the workaround suggested here: https://dev.to/onmyway133/how-to-use-sonarqube-in-swift-projects-5db5

However, I get a different issue now:

ERROR: Error during SonarQube Scanner execution
java.lang.UnsupportedOperationException: Can not add the same measure twice on Source/XXXX/XXXX.swift: DefaultMeasure[component=Source/XXXX/XXXX.swift,metric=Metric[id=<null>,key=ncloc,description=Non commenting lines of code,type=INT,direction=-1,domain=Size,name=Lines of Code,qualitative=false,userManaged=false,enabled=true,worstValue=<null>,bestValue=<null>,optimizedBestValue=false,hidden=false,deleteHistoricalData=false,decimalScale=<null>],value=6,fromCore=false]
	at org.sonar.scanner.sensor.DefaultSensorStorage.saveMeasure(DefaultSensorStorage.java:172)
	at org.sonar.scanner.sensor.DefaultSensorStorage.store(DefaultSensorStorage.java:132)
	at org.sonar.api.batch.sensor.measure.internal.DefaultMeasure.doSave(DefaultMeasure.java:95)
	at org.sonar.api.batch.sensor.internal.DefaultStorable.save(DefaultStorable.java:45)
	at com.backelite.sonarqube.commons.MeasureUtil.saveMeasure(MeasureUtil.java:34)
	at com.backelite.sonarqube.swift.SwiftSquidSensor.saveMeasures(SwiftSquidSensor.java:86)
	at com.backelite.sonarqube.swift.SwiftSquidSensor.save(SwiftSquidSensor.java:79)
	at com.backelite.sonarqube.swift.SwiftSquidSensor.execute(SwiftSquidSensor.java:140)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:400)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:395)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:358)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	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(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:185)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)

Does anyone know what this is about?

@tyoc213
Copy link

tyoc213 commented Aug 7, 2019

I have the same issue

INFO: SonarQube Scanner 3.3.0.1492
INFO: Java 1.8.0_121 Oracle Corporation (64-bit)
INFO: Mac OS X 10.14.4 x86_64
INFO: SonarQube server 7.7.0

Workaround:
Ok so the fastest way to get it working is to delete or comment out line with SwiftMetric.FILES in SwiftSquidSensor.java and ObjectiveCMetric.FILES in ObjectiveCSquidSensor.java. Then it is easy to build the jar file with mvn clean install and replace the old plugin in SonarQube plugins directory.

what would be the correct way that maintainers would solve this?? so that it can be merged into master/dev and get a new official release that support current sonar?

@tyoc213
Copy link

tyoc213 commented Aug 7, 2019

@gaelfoppolo
Copy link
Collaborator

#238 should fix this issue. Awaiting merge.

@tyoc213
Copy link

tyoc213 commented Aug 10, 2019

Nice, we will have a new release (specifiying incompatibility.. or we will just compile the version?)

@gaelfoppolo
Copy link
Collaborator

We have to discuss if we should embed this fix or not, regarding the incompatibility.
At the moment, I can't say if a new release will be issued soon.
If you need to fix, compile your own version, pending the release with this fix.

@kanakaraju043
Copy link

Can any one help with working sonar plugin by fixing below issue
Metric 'files' should not be computed by a sensor

@gaelfoppolo
Copy link
Collaborator

New release embed this fix. Closing this issue.

@babusatti
Copy link

babusatti commented Feb 2, 2021

Getting same Metric files error...can i use this plugin in Linux?

OS:linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests