We have configured SonarQube with Jenkins and running the build,
build is failing with the below error message
`
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 13.295s
INFO: Final Memory: 25M/270M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
ERROR: Language of file ‘Data.Business\DataSearch.vb’ can not be decided as the file matches patterns of both sonar.lang.patterns.vbnet : /.vb and sonar.lang.patterns.vb : **/.vb,/.bas,**/.frm,/*.ctl,/.vb,**/.bas,/*.frm,/.ctl
ERROR: The SonarScanner did not complete successfully
`
As i am not global administrator,so tried to fix at project level,but didn’t work
SonarScanner.MSBuild.exe begin /k:“Something” /d:sonar.lang.patterns.vb=".bas"
Please suggest how can we fix this issue or if there is any way to focus on only specific lang like c# and vb
Your idea is a correct solution if you cannot change the project settings. I’m personally using this, can you try it like that?
/d:sonar.lang.patterns.vb="*.bas"
The difference is the * in the pattern. I’m not sure if that could be the reason why it didn’t work for you, but the variant with * works for my usual testing purposes.