SonarCloud Java + TypeScript maven project, only Java scanned

Template for a good new topic, formatted with Markdown:

  • ALM used GitHub
  • CI system used -
  • Scanner command used when applicable -
  • Languages of the repository Java, TypeScript, JavaScript, React
  • Only if the SonarCloud project is public, the URL -
  • Error observed - files not scanned

Standard structure of our maven project:
/ pom.xml
/ module1 / frontend / project - typescript files here
/ module1 / src / main - java here
/ module2 / frontend / project - typescript files here
/ module2 / src / main - java here

Only Java files are scanned, /frontend files are omitted. I’ve tried adding with:


But it seems not to be applied by SonarCloud.

We have TypeScript scanning rules enabled. I have no idea how to check SonarCloud logs.

Hey there.

As noted in the documentation for Automatic Analysis for Java:

Java automatic analysis does not support the following properties:

  • sonar.sources
  • sonar.tests
  • sonar.inclusions
  • sonar.test.inclusions

This is because we assume that your files will follow the standard directory layout that is expected by Maven and Gradle (**/src/main/**/* and **/src/test/**/*) for Java projects.

If your files exist outside src/main, you will want to use CI-based analysis and adjust sonar.sources in your pom.xml


Thanks for reply, I’ve ended up moving analysis into our CI (which is TeamCity).

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