Sonarcloud automatic scan for react + springboot project

I am having an issue with the automatic analysis of my project with sonarcloud. My project contains both java code (springboot, with java gradle) and javascript code (React JS). The problem is that only the java code is analyzed (all the javascript code is ignored and it’s not visible on the project page on sonarcloud. The setup is pretty basic (I added our GitHub repository to sonarcloud and analyzed it with all default settings. I also tried looking at some documentation and i found that there is a way to define where the code to analyze is located (with a sonar-project.properties file) but also that isn’t working.
The project structure is the following:

  • root contains the whole springboot project (which is getting analyzed)
  • frontend folder contains the react project

How can I make sonarcloud analyze also react project?

Hi,

Welcome to the community!

I’m guessing you build with Maven or Gradle? That’s probably the problem - autoscan is taking a Java-centric view of your project, based on the build technology.

You’re on the right track, but that file is for when you’re running analysis yourself. You want a .sonarcloud.properties file.

 
HTH,
Ann

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