SonarQube server: Developer Edition v10.7 (Docker deploy with Nomad)
I am trying to setup SonarQube Developer Edition for my org and have an instance up and running (got the license recently). I have hit a wall with running an analysis for my repos wherein all files are getting excluded due to SCM ignore settings. I found few posts regarding the same but nothing has worked for me so far except for using the setting *sonar.scm.exclusions.disabled*
set to true which basically strips off all the blame information and then pull request decoration also does not work correctly as it fails to identify new code after the last version.
Projects that I am analyzing are Java Spring boot apps built with Gradle 7+. I have tried running scans both locally and via Github Actions but without vain. Updating or deleting gitignore file also did not have any effect.
Command used to run scan : ./gradlew sonar
I have also tried to use various properties like sonar.inclusions, sonar.sources etc without any effect. Any help here would be greatly appreciated.
Note: Login to sonarqube is through Okta (SAML) and not delegated to Github, so the user SCM account is set to their email which may/maynot be linked to their Github account. I am not sure if this could be an issue.
I can share specific logs if needed (since the log is too long when I run with --debug). Here is a brief snippet from the scan logs
2024-11-25T13:33:43.534+0530 [INFO] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Branch name: sonar-test
2024-11-25T13:33:43.538+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language Kubernetes were converted to sonar.lang.patterns.kubernetes :
2024-11-25T13:33:43.538+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language CSS were converted to sonar.lang.patterns.css : **/*.css,**/*.less,**/*.scss,**/*.sass
2024-11-25T13:33:43.538+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language Scala were converted to sonar.lang.patterns.scala : **/*.scala
2024-11-25T13:33:43.538+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language JSP were converted to sonar.lang.patterns.jsp : **/*.jsp,**/*.jspf,**/*.jspx
2024-11-25T13:33:43.538+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language JavaScript were converted to sonar.lang.patterns.js : **/*.js,**/*.jsx,**/*.cjs,**/*.mjs,**/*.vue
2024-11-25T13:33:43.538+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language Python were converted to sonar.lang.patterns.py : **/*.py
2024-11-25T13:33:43.539+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language Docker were converted to sonar.lang.patterns.docker : **/Dockerfile,**/*.dockerfile
2024-11-25T13:33:43.539+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language PL/SQL were converted to sonar.lang.patterns.plsql : **/*.sql,**/*.pks,**/*.pkb
2024-11-25T13:33:43.539+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language Dart were converted to sonar.lang.patterns.dart : **/*.dart
2024-11-25T13:33:43.539+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language Java were converted to sonar.lang.patterns.java : **/*.java,**/*.jav
2024-11-25T13:33:43.539+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language HTML were converted to sonar.lang.patterns.web : **/*.html,**/*.xhtml,**/*.cshtml,**/*.vbhtml,**/*.aspx,**/*.ascx,**/*.rhtml,**/*.erb,**/*.shtm,**/*.shtml,**/*.cmp,**/*.twig
2024-11-25T13:33:43.539+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language Flex were converted to sonar.lang.patterns.flex : **/*.as
2024-11-25T13:33:43.539+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language XML were converted to sonar.lang.patterns.xml : **/*.xml,**/*.xsd,**/*.xsl,**/*.config
2024-11-25T13:33:43.539+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language JSON were converted to sonar.lang.patterns.json : **/*.json
2024-11-25T13:33:43.539+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language IPython Notebooks were converted to sonar.lang.patterns.ipynb : **/*.ipynb
2024-11-25T13:33:43.539+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language Text were converted to sonar.lang.patterns.text :
2024-11-25T13:33:43.539+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language VB.NET were converted to sonar.lang.patterns.vbnet : **/*.vb
2024-11-25T13:33:43.539+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language CloudFormation were converted to sonar.lang.patterns.cloudformation :
2024-11-25T13:33:43.539+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language Swift were converted to sonar.lang.patterns.swift : **/*.swift
2024-11-25T13:33:43.539+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language YAML were converted to sonar.lang.patterns.yaml : **/*.yaml,**/*.yml
2024-11-25T13:33:43.540+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language C++ were converted to sonar.lang.patterns.cpp : **/*.cc,**/*.cpp,**/*.cxx,**/*.c++,**/*.hh,**/*.hpp,**/*.hxx,**/*.h++,**/*.ipp,**/*.ixx,**/*.mxx,**/*.cppm,**/*.ccm,**/*.cxxm,**/*.c++m
2024-11-25T13:33:43.540+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language C were converted to sonar.lang.patterns.c : **/*.c,**/*.h
2024-11-25T13:33:43.540+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language Go were converted to sonar.lang.patterns.go : **/*.go
2024-11-25T13:33:43.540+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language Kotlin were converted to sonar.lang.patterns.kotlin : **/*.kt,**/*.kts
2024-11-25T13:33:43.540+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language T-SQL were converted to sonar.lang.patterns.tsql : **/*.tsql
2024-11-25T13:33:43.540+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language Secrets were converted to sonar.lang.patterns.secrets :
2024-11-25T13:33:43.540+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language Ruby were converted to sonar.lang.patterns.ruby : **/*.rb
2024-11-25T13:33:43.540+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language C# were converted to sonar.lang.patterns.cs : **/*.cs,**/*.razor
2024-11-25T13:33:43.540+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language PHP were converted to sonar.lang.patterns.php : **/*.php,**/*.php3,**/*.php4,**/*.php5,**/*.phtml,**/*.inc
2024-11-25T13:33:43.540+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language Terraform were converted to sonar.lang.patterns.terraform : **/*.tf
2024-11-25T13:33:43.540+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language AzureResourceManager were converted to sonar.lang.patterns.azureresourcemanager : **/*.bicep
2024-11-25T13:33:43.540+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language ABAP were converted to sonar.lang.patterns.abap : **/*.abap,**/*.ab4,**/*.flow,**/*.asprog
2024-11-25T13:33:43.541+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language Objective-C were converted to sonar.lang.patterns.objc : **/*.m
2024-11-25T13:33:43.541+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Declared patterns of language TypeScript were converted to sonar.lang.patterns.ts : **/*.ts,**/*.tsx,**/*.cts,**/*.mts
2024-11-25T13:33:43.548+0530 [INFO] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Preprocessing files...
2024-11-25T13:33:43.564+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] loading config FileBasedConfig[/Users/kapil-mangtani/.config/jgit/config]
2024-11-25T13:33:43.567+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] readpipe [bash, --login, -c, which git],/Users/kapil-mangtani
2024-11-25T13:33:43.610+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] readpipe may return '/usr/bin/git'
2024-11-25T13:33:43.610+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] remaining output:
2024-11-25T13:33:43.610+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] readpipe [xcode-select, -p],/Users/kapil-mangtani
2024-11-25T13:33:43.630+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] readpipe may return '/Library/Developer/CommandLineTools'
2024-11-25T13:33:43.630+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] remaining output:
2024-11-25T13:33:43.630+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] readpipe [/usr/bin/git, --version],/usr/bin
2024-11-25T13:33:43.672+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] readpipe may return 'git version 2.39.3 (Apple Git-146)'
2024-11-25T13:33:43.672+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] remaining output:
2024-11-25T13:33:43.672+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] readpipe [/usr/bin/git, config, --system, --show-origin, --list, -z],/usr/bin
2024-11-25T13:33:43.706+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] readpipe may return 'null'
2024-11-25T13:33:43.706+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] remaining output:
2024-11-25T13:33:43.707+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] readpipe rc=128
2024-11-25T13:33:43.708+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Exception caught during execution of command '[/usr/bin/git, config, --system, --show-origin, --list, -z]' in '/usr/bin', return code '128', error message 'fatal: unable to read config file '/etc/gitconfig': No such file or directory
'
2024-11-25T13:33:43.708+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] loading config FileBasedConfig[/Users/kapil-mangtani/.config/git/config]
2024-11-25T13:33:43.708+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] loading config UserConfigFile[/Users/kapil-mangtani/.gitconfig]
2024-11-25T13:33:43.750+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] 95 non excluded files in this Git repository
2024-11-25T13:33:43.754+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] File '/Users/kapil-mangtani/IdeaProjects/xxx/metrics/ApplicationInformationInstrumentation.java' is excluded by the scm ignore settings.
2024-11-25T13:33:43.754+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] File '/Users/kapil-mangtani/IdeaProjects/xxxmetrics/HealthMetricsConfiguration.java' is excluded by the scm ignore settings.
...988 similar logs
2024-11-25T13:33:43.805+0530 [INFO] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] 0 languages detected in 0 preprocessed files
2024-11-25T13:33:43.805+0530 [INFO] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] 990 files ignored because of scm ignore settings
2024-11-25T13:33:43.806+0530 [INFO] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Loading plugins for detected languages
2024-11-25T13:33:43.806+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Detected languages: []
2024-11-25T13:33:43.806+0530 [INFO] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Load/download plugins
2024-11-25T13:33:43.806+0530 [INFO] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Load/download plugins (done) | time=0ms
2024-11-25T13:33:43.806+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] Optional language-specific plugins not loaded: [abap, csharp, cpp, cfamilydependencies, dbd, dbdjavafrontend, dbdpythonfrontend, flex, go, web, javasymbolicexecution, java, javascript, kotlin, php, plsql, python, ruby, sonarscala, swift, tsql, vbnet, security, securitycsharpfrontend, securityjsfrontend, securityjavafrontend, securityphpfrontend, securitypythonfrontend, dart]
2024-11-25T13:33:43.806+0530 [DEBUG] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] No plugins loaded
2024-11-25T13:33:44.122+0530 [INFO] [org.sonarsource.scanner.lib.internal.ScannerEngineLauncher] 0 files indexed