Sonar scanner not analyzing groovy code

Hi Team,

I am trying to analyze groovy in sonarqube but sonar-scanner skipping the groovy files.
SQ version - 8.9.2
Groovy plugin - 1.8

Below is the sonar-project.properties file -

sonar.host.url=http://10calhost:9000
sonar.login=62dcb
sonar.projectKey=sonarqube:groovy-example
sonar.projectName=groovy-example
sonar.groovy.file.suffixes=/root/groovy/groovy-example/scripts
sonar.groovy.binaries=/root/groovy/groovy-example/scripts
sonar.java.binaries=.

sonar.sources=.

# Encoding of the source files
sonar.sourceEncoding=UTF-8

# Language
sonar.language=grvy

Can you please help me to analyze groovy code in SQ?.

FYI - There is no pom.xml file in the project directory. Pom.XML file required to analyze the groovy code?.

Thanks in advance,
ch

Hi,

I see you’re trying to narrow analysis to Groovy with sonar.language but that parameter hasn’t worked in many years; it has no effect.

What is having an effect is this:

What you’ve done here is to tell analysis to only recognize as Groovy files those that end with that path. So myGroovyFile./root/groovy/groovy-example/scripts. Not, I think, what you intended.

Since Groovy is not a natively supported language, I can’t comment on the sonar.groovy.binaries property except to say you should double-check it.

 
HTH,
Ann