which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
SonarQube Enterprise Edition - 7.9.1.27448
SonarLint - 4.1
Topaz Workbench IDE
what are you trying to achieve
List item
Analyse a mainframe Project (COBOL, COPYBOOKS) from IDE using sonar lint and binding the project in SonarQube and run the analysis to get the issues and recommendations on fly.
Scan is working fine from SonarQube from Jenkins, seeing only issue with mainframe projects.
Noticed Java projects are being scanned properly and getting the analysis.
what have you tried so far to achieve this
Noticed initially when i run the scan directly from Jenkins it was skipping the .cbl, cpy , later i have added the sonar-project.properties with the below details and later i see scan was done successfully on cbl, cpy.
But when it comes to eclipse - SonarLint - SonarQube Binding i dont see any scan is been done and dont see any recommendations and issues being showed up.
Open the project properties and select âSonarLintâ and then âAnalyzer propertiesâ: I believe you should enter there the settings you put in sonar-project.properties, at least sonar.cobol.file.suffixes.
Error during execution of SonarLint analysis
java.lang.UnsupportedOperationException:
The only way to get an accurate analysis of C/C++/Objective-C files is by using the SonarSource build-wrapper
and setting the property âsonar.cfamily.build-wrapper-outputâ, but it was not specified.
If you donât want to analyze C/C++/Objective-C files, then prevent them from being analyzed by setting the following properties:
sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=-
sonar.objc.file.suffixes=-
at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:116)
at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.executeSensor(SensorsExecutor.java:81)
at org.sonarsource.sonarlint.core.analyzer.sensor.SensorsExecutor.execute(SensorsExecutor.java:72)
at org.sonarsource.sonarlint.core.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:134)
at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:125)
at org.sonarsource.sonarlint.core.container.ComponentContainer.execute(ComponentContainer.java:110)
at org.sonarsource.sonarlint.core.container.storage.StorageAnalyzer.analyze(StorageAnalyzer.java:75)
at org.sonarsource.sonarlint.core.container.storage.StorageContainerHandler.analyze(StorageContainerHandler.java:81)
at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.lambda$analyze$0(ConnectedSonarLintEngineImpl.java:152)
at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.withReadLock(ConnectedSonarLintEngineImpl.java:344)
at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.withReadLock(ConnectedSonarLintEngineImpl.java:334)
at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.analyze(ConnectedSonarLintEngineImpl.java:149)
at org.sonarlint.eclipse.core.internal.server.Server.runAnalysis(Server.java:327)
at org.sonarlint.eclipse.core.internal.jobs.AnalyzeConnectedProjectJob.runAnalysis(AnalyzeConnectedProjectJob.java:72)
at org.sonarlint.eclipse.core.internal.jobs.AnalyzeConnectedProjectJob.runAnalysis(AnalyzeConnectedProjectJob.java:1)
at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.run(AbstractAnalyzeProjectJob.java:399)
at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.runAnalysisAndUpdateMarkers(AbstractAnalyzeProjectJob.java:207)
at org.sonarlint.eclipse.core.internal.jobs.AbstractAnalyzeProjectJob.doRun(AbstractAnalyzeProjectJob.java:169)
at org.sonarlint.eclipse.core.internal.jobs.AbstractSonarProjectJob.run(AbstractSonarProjectJob.java:45)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
It seems that thereâs a problem with the C/C++ analyzer which I donât really understand.
I suggest that you exclude files ending with â.incâ: right-click on the file and select âSonarLintâ > âExcludeâ.
Appreciate all the help @pynicolas . Excluded the files with .inc and now i am not seeing any errors and continue with the Scan and it is providing the desired output.