0

In my build pipeline I add the sources like this:

sonar.sources=moduleA/moduleA

However, moduleA at some point imports something from moduleB.

from moduleB import foo

Which results in Sonarqube complaining No name 'foo' in module 'moduleB'.

timbmg
  • 3,192
  • 7
  • 34
  • 52

1 Answers1

1

Assuming your project root directory contains sonar-project.properties and 2 folders(modules) moduleA and moduleB

sonar.modules=moduleA,moduleB

All sonar.xxx. properties will be inherited by modules unless overridden by module.

moduleA.sonar.projectName=Module A is the best
moduleA.sonar.sources=moduleA/moduleA, ../moduleB/moduleB  

ModuleA has moduleA and B as sources or potentially include moduleB as its own module, or both, do feel free to play around with it.

moduleB.sonar.projectName=Module B is the bestest
moduleB.sonar.sources=moduleB/moduleB
Aistis Taraskevicius
  • 781
  • 2
  • 10
  • 31