Undetected languages by sonarqube

  • What are you trying to achieve

We want sonarqube scan on a github repo to recognise / scan for multiple languages.

Github recognises the following languages for our repo:

Screenshot 2022-06-09 at 12.45.25 PM

When we upload this codebase to sonarqube server for scanning via jenkins, it does not recognise any language for this code base.

Screenshot 2022-06-09 at 12.48.45 PM

Also, the code section of the project only has a couple of files, whereas the repo itself has around 150 files. We are expecting python and groovy languages to be recognized / scanned

This is the sonar-project.properties file that we are using (no explicit exclusions etc) with commit id and project name masked

sonar.projectKey=XXX
sonar.projectVersion=<commit-id>
sonar.sourceEncoding=UTF-8
sonar.pullrequest.branch=testing-sonar
sonar.pullrequest.key=51
sonar.pullrequest.base=main
sonar.pullrequest.provider=github

This language recognition is working fine for other repos that we have uploaded in a similar way.

  • What have you tried so far to achieve this

We upgraded to latest version of the cli / server for any upgrade issues.
We checked community forum for similar issues. We noted that sonar.language option is deprecated.
We don’t have a clue on what to check next.

  • which versions are you using?
    Sonarqube server version: 9.4.0.54424
    Server is registered with Enterprise license

Sonarqube scanner details:

INFO: SonarScanner 4.7.0.2747
INFO: Java 11.0.14.1 Eclipse Adoptium (64-bit)
INFO: Linux 4.15.0-156-generic amd64

Hey there.

SonarQube supports a specific list of languages, that list does not include Lua, Groovy, Shell, or Dockerfiles.

It also looks like you’re manually triggering a pull request analysis, which will only raise issues on changed lines of changed files (and changed files are the only ones that will appear in the Code tab).

You should scan your main branch without sonar.pullrequest.* parameters to see full results for all your files.

You are correct Colin . Thank you for pointing this out

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.