"The main branch of this project is empty" for js files

Sonar Qube Version : 8.4.2.36762
Sonar Scanner Version: 4.2.0.1873-windows

I’m trying to scan the project using above configuration. What i am see in the web dashboard for the project is The main branch of this project is empty. But background task is success and here is the context

SonarQube plugins:

  • Python Code Quality and Security 2.13.0.7236 (python)
  • SonarCSS 1.2.0.1325 (cssfamily)
  • JaCoCo 1.1.0.898 (jacoco)
  • SonarGo 1.6.0.719 (go)
  • SonarKotlin 1.5.0.315 (kotlin)
  • Svn 1.10.0.1917 (scmsvn)
  • SonarJS 6.2.1.12157 (javascript)
  • SonarRuby 1.5.0.315 (ruby)
  • SonarScala 1.5.0.315 (sonarscala)
  • C# Code Quality and Security 8.9.0.19135 (csharp)
  • Findbugs 4.0.1 (findbugs)
  • Java Code Quality and Security 6.5.1.22586 (java)
  • SonarHTML 3.2.0.2082 (web)
  • Git 1.12.0.2034 (scmgit)
  • SonarFlex 2.5.1.1831 (flex)
  • SonarXML 2.0.1.2020 (xml)
  • PHP Code Quality and Security 3.5.0.5655 (php)
  • SonarTS 2.1.0.4359 (typescript)
  • VB.NET Code Quality and Security 8.9.0.19135 (vbnet)
  • Community Branch Plugin 1.4.0 (communityBranchPlugin)
  • ESLint 0.4.0 (eslintplugin)

Project server settings:
Project scanner properties:

  • sonar.host.url=http://localhost:9000
  • sonar.projectBaseDir=C:\app_20200923_172623
  • sonar.projectKey=app
  • sonar.projectName=app
  • sonar.scanner.app=ScannerCli
  • sonar.scanner.appVersion=4.2.0.1873
  • sonar.sourceEncoding=windows-1252
  • sonar.sources=src
  • sonar.working.directory=C:\app_20200923_172623.scannerwork

Warning:
SCM provider autodetection failed. Please use “sonar.scm.provider” to define SCM of your project or disable the SCM sensor in the project settings

i’m just using my local source code for scanning.

JavaScript and TypeScript rules were not executed. Error when running ‘node -v’. Is Node.js available during analysis

Hi Vinod, welcome to the SonarSource Community!

Your problem is likely that you’re including a sonar.branch.name parameter as part of the analysis, whereas our expectation is that the main branch of the project be scanned without any branch parameter.

I see you’ve also installed the community branch plugin; I can’t comment on what its presence does here, but if you don’t need it and simply want to analyze your project based on local checkouts, I might suggest doing without this plugin.

Yes i have removed as you suggest. Now its working able to see analysis report.

Thanks for your quick support.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.