Search code examples
sonarqubecobolsonar-runnersonarqube-scan

Unable to scan Cobol project using SonarQube


I am trying to workout code analysis for my COBOL code with SonarQube. I installed sonarcobol plugin and using sonarscanner I am trying to check for analysis. when I do sonar-scanner in respective directory, it says success but unable to see analysis in SonarQube server.

Attached is my sonar-project.properties

sonar.host.url=http://xxxxx:9000/
sonar.login=admin
sonar.password=admin




sonar.projectKey=cobol
sonar.projectName=cobol
sonar.projectVersion=1.0


sonar.sources=.
sonar.sourceEncoding=UTF-8



 ## Cobol Specific Properties


# comma-separated paths to directories with copybooks
sonar.cobol.copy.directories=copybooks
# comma-separated list of suffixes
sonar.cobol.file.suffixes=cbl,cpy
sonar.cobol.copy.suffixes=cpy

 ## Flex Specific Properties


# retrieve code coverage data from the Cobertura report
#sonar.flex.cobertura.reportPath=coverage-report/coverage-cobertua-flex.xml


# PL/I Specific Properties
sonar.pli.marginLeft=2
sonar.pli.marginRight=0


Solution

  • from the Author's comment above:

    I solved this by adding sonar.languages=COBOL in sonar-project.properties

    Pasting here for convenience.