Css file getting removed automatically from the SonarQube project

SonarQube Version - 8.9.6

Hello All,

We have a Github repository that has .py, XML, and CSS files. All files are scanning successfully and adding analysis details in the SonarQube project but after 12 + hours CSS files are automatically getting removed from the sonarqube project and we can see only. Py and .XML files.
Does anyone know what might be the issue?. why CSS files are getting removed from the project?.
attached is Jenkins log file.

Thanks in Advance,

css_Jenkins.txt (246.5 KB)


Are you sure you attached the right log file? I don’t see anything about CSS files being removed, this analysis take “only” 2.5h, and this project includes C++ files.


Yes, it’s the correct log. I see cpp files in the repository and after scanning I can see cpp files in sonarqube project and after some time files are getting removed.


I’m confused. Is this about CSS files being removed or C++ files being removed?


sorry for the confusion. .cpp files are getting removed


To be clear, what you’re seeing is that you analyze and the C++ files are there, visible in SonarQube. And then after 12h they disappear from SonarQube? If that’s the case, it sounds like you have multiple analyses running that use the same project key. Analyses are not additive. The project homepage will always show the results of the latest analysis. So it looks like a subsequent analysis is replacing the one that includes your C++ files.


To be clear, what you’re seeing is that you analyze and the C++ files are there, visible in SonarQube. And then after 12h they disappear from SonarQube? – Yes.

I see only one project has that project Key in the entire instance. And no other scans are running on that particular branch apart from which I am running.


SonarQube only makes changes to projects during analysis report processing (updating with the new analysis results & running housekeeping). There’s no other way for files to be disappearing from your project than that there’s another analysis running that doesn’t include them.


Hi @bunty ,

Take a quick look at the Background Tasks page in your SonarQube project - this should list all analyses that have run. Most likely, this is someone / something running an incomplete analysis that you may not be aware of.

1 Like

I don’t see any scans on the Particular branch which I am working. I can see only one scan which I ran.
Here are the properties from the background scan
SonarQube plugins:

  • CSS Code Quality and Security (cssfamily)
  • Ansible Lint 2.4.0 (ansible)
  • PL/SQL Code Quality and Security (plsql)
  • Scala Code Quality and Security (sonarscala)
  • C# Code Quality and Security (csharp)
  • Vulnerability Analysis (security)
  • Java Code Quality and Security (java)
  • HTML Code Quality and Security (web)
  • Flex Code Quality and Security (flex)
  • XML Code Quality and Security (xml)
  • VB.NET Code Quality and Security (vbnet)
  • Swift Code Quality and Security (swift)
  • YAML Analyzer 1.6.0 (yaml)
  • CFamily Code Quality and Security (cpp)
  • Python Code Quality and Security (python)
  • Go Code Quality and Security (go)
  • JaCoCo (jacoco)
  • Kotlin Code Quality and Security (kotlin)
  • RPG Code Quality (rpg)
  • ShellCheck Analyzer 2.4.0 (shellcheck)
  • PL/I Code Quality and Security (pli)
  • T-SQL Code Quality and Security (tsql)
  • VB6 Code Quality and Security (vb)
  • Apex Code Quality and Security (sonarapex)
  • JavaScript/TypeScript Code Quality and Security (javascript)
  • Ruby Code Quality and Security (ruby)
  • Vulnerability Rules for C# (securitycsharpfrontend)
  • Vulnerability Rules for Java (securityjavafrontend)
  • License for SonarLint (license)
  • Vulnerability Rules for JS (securityjsfrontend)
  • Groovy 1.8 (groovy)
  • COBOL Code Quality (cobol)
  • Vulnerability Rules for Python (securitypythonfrontend)
  • PHP Code Quality and Security (php)
  • ABAP Code Quality and Security (abap)
  • Vulnerability Rules for PHP (securityphpfrontend)
    Global server settings:
  • sonar.cfamily.bullseye.reportPath=bullseyexml
  • sonar.core.id=
  • sonar.core.serverBaseURL=https://localhost
  • sonar.core.startTime=2022-03-24T01:45:21-0400
  • sonar.dbcleaner.branchesToKeepWhenInactive=(branch|release|integration)[-/][0-9a-zA-Z].*
  • sonar.forceAuthentication=false
  • sonar.groovy.file.suffixes=.groovy,.gradle
  • sonar.lf.aboutText=

    SonarQube 8.9.6 LTS


- sonar.plugins.risk.consent=ACCEPTED - sonar.tsql.file.suffixes=.tsql - sonar.vb.file.suffixes=,.bas,.frm,.cls,.ctl,.BAS,.FRM,.CLS,.CTL Project server settings: Project scanner properties: - sonar.analysis.branch=main - sonar.analysis.repository.url - sonar.analysis.type=branch - sonar.branch.name=main - sonar.c.file.suffixes=- - sonar.cpp.file.suffixes=- - sonar.exclusions=**/vendor/**,**/_test.go,**/_generated*.go,**/ClientApp/src/help/**,**/*.java,**/mocks/** - sonar.github.endpoint= - sonar.github.repository=test/test - sonar.host.url= - sonar.inclusions=**/*.rb,**/*.css,**/*.yaml,**/*.yml,**/*.cc,**/*.cxx,**/*.erb,**/*.c,**/*.cpp,**/*.hpp,**/*.java,**/*.html,**/*.scss,**/*.xml,**/*.xsl,**/*.sql,**/*.bash,**/*.py,**/*.h,**/*.inc,**/*.php,**/*.sh - sonar.links.scm= - sonar.log.level=TRACE - sonar.objc.file.suffixes=- - sonar.projectBaseDir=/usr/src - sonar.projectDescription=Code Analysis - sonar.projectKey=test::test - sonar.projectName=test::test - sonar.scanner.app=ScannerCLI - sonar.scanner.appVersion= - sonar.scm.forceReloadAll=true - sonar.scm.provider=git - sonar.sourceEncoding=UTF-8 - sonar.test.exclusions=**/vendor/** - sonar.test.inclusions=**/*_test.go - sonar.userHome=.sq - sonar.working.directory=/usr/src/.scannerwork