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,
Bunty

css_Jenkins.txt (246.5 KB)

Hi,

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.

 
Ann

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.

Hi,

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

 
Ann

sorry for the confusion. .cpp files are getting removed

Hi,

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.

 
HTH,
Ann

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.

Hi,

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.

 
HTH,
Ann

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 1.4.2.2002 (cssfamily)
  • Ansible Lint 2.4.0 (ansible)
  • PL/SQL Code Quality and Security 3.6.1.3873 (plsql)
  • Scala Code Quality and Security 1.8.3.2219 (sonarscala)
  • C# Code Quality and Security 8.22.0.31243 (csharp)
  • Vulnerability Analysis 8.9.0.11439 (security)
  • Java Code Quality and Security 6.15.1.26025 (java)
  • HTML Code Quality and Security 3.4.0.2754 (web)
  • Flex Code Quality and Security 2.6.1.2564 (flex)
  • XML Code Quality and Security 2.2.0.2973 (xml)
  • VB.NET Code Quality and Security 8.22.0.31243 (vbnet)
  • Swift Code Quality and Security 4.3.1.4892 (swift)
  • YAML Analyzer 1.6.0 (yaml)
  • CFamily Code Quality and Security 6.20.2.38358 (cpp)
  • Python Code Quality and Security 3.4.1.8066 (python)
  • Go Code Quality and Security 1.8.3.2219 (go)
  • JaCoCo 1.1.1.1157 (jacoco)
  • Kotlin Code Quality and Security 1.8.3.2219 (kotlin)
  • RPG Code Quality 2.5.1.2575 (rpg)
  • ShellCheck Analyzer 2.4.0 (shellcheck)
  • PL/I Code Quality and Security 1.11.1.2727 (pli)
  • T-SQL Code Quality and Security 1.5.1.4340 (tsql)
  • VB6 Code Quality and Security 2.7.1.2721 (vb)
  • Apex Code Quality and Security 1.8.3.2219 (sonarapex)
  • JavaScript/TypeScript Code Quality and Security 7.4.4.15624 (javascript)
  • Ruby Code Quality and Security 1.8.3.2219 (ruby)
  • Vulnerability Rules for C# 8.9.0.11439 (securitycsharpfrontend)
  • Vulnerability Rules for Java 8.9.0.11439 (securityjavafrontend)
  • License for SonarLint 8.9.6.50800 (license)
  • Vulnerability Rules for JS 8.9.0.11439 (securityjsfrontend)
  • Groovy 1.8 (groovy)
  • COBOL Code Quality 4.6.2.4876 (cobol)
  • Vulnerability Rules for Python 8.9.0.11439 (securitypythonfrontend)
  • PHP Code Quality and Security 3.17.0.7439 (php)
  • ABAP Code Quality and Security 3.9.1.3127 (abap)
  • Vulnerability Rules for PHP 8.9.0.11439 (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=4.6.0.2311 - 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