DanielHWe / sonar-fxcop

FxCop plugin for C# or VB.NET projects
14 stars 6 forks source link

vbnet project fails to process #30

Open maruthijr opened 5 years ago

maruthijr commented 5 years ago

Because of a bug in property names (they have gotten interchanged), vb-net analysis fails. I have also attached a tested fix in a patch. Please merge

INFO: sonar.dotnet.visualstudio.solution.file not set WARN: FxCop plugin missed the definition of what to scan. Please set one of folowing properties:sonar.cs.fxcop.assembly, sonar.cs.fxcop.project, sonar.cs.fxcop.reportPath or sonar.cs.fxcop.slnFile WARN: Use default sln file found: C:\opt INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------ INFO: Total time: 11.828s ERROR: Error during SonarQube Scanner execution java.lang.IllegalArgumentException: Cannot find the sln file "C:\opt" provided by the property "sonar.cs.fxcop.slnFile". at com.google.common.base.Preconditions.checkArgument(Preconditions.java:88) at org.sonar.plugins.fxcop.FxCopConfiguration.checkSlnProperty(FxCopConfiguration.java:312) at org.sonar.plugins.fxcop.FxCopConfiguration.checkScanProperties(FxCopConfiguration.java:151) at org.sonar.plugins.fxcop.FxCopConfiguration.checkProperties(FxCopConfiguration.java:124) at org.sonar.plugins.fxcop.FxCopSensor.executeImpl(FxCopSensor.java:79) at org.sonar.plugins.fxcop.FxCopSensor.execute(FxCopSensor.java:73) at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53) at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:88) at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:82) at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:68) at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:88) at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:177) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121) at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:291) at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:286) at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:264) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121) at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48) at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121) at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121) at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116) at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:111) at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62) 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:497) 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:233) at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151) at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110) at org.sonarsource.scanner.cli.Main.execute(Main.java:74) at org.sonarsource.scanner.cli.Main.main(Main.java:61)

Patch to fix the issue attached patch.txt

DanielHWe commented 4 years ago

Can you please make a Pull request