SonarQube does not analyze files after upgrade from 4.2 to 4.3
Asked Answered
G

1

9

After the upgrade of sonarqube 4.2 to 4.3 i'm getting this message:

13:15:18.349 WARN - File '%s' is ignored. It is not located in module basedir '%s'. [repeated for (assuming) all my c# files]

13:15:18.349 INFO - 0 files indexed

We run sonar from msbuild, and pass in (among others) the command line argument: -D sonar.sources="../../Source/"

Which is correctly resolved the full path is can see in the logging

the output displays

C:\projects\myproject\build\Tools\SonarRunner.2.3\bin..

SonarQube Runner 2.3

Java 1.7.0_51 Oracle Corporation (64-bit)

Windows 8 6.2 amd64

INFO: Runner configuration file: C:\projects\project\build\Tools\SonarRunner.2.3\bin..\conf\sonar-runner.properties

INFO: Project configuration file: NONE

INFO: Default locale: "en_GB", source code encoding: "UTF-8"

INFO: Work directory: C:\projects\project\Build\Scripts.sonar

INFO: SonarQube Server 4.3

13:13:43.706 INFO - Load batch settings

13:13:43.924 INFO - User cache: C:\Users\username.sonar\cache

13:15:16.155 INFO - No quality gate is configured.

13:15:16.356 INFO - Base dir: C:\projects\project\Build\Scripts

13:15:16.356 INFO - Working dir: C:\projects\project\Build\Scripts.sonar

13:15:16.356 INFO - Source dirs: C:\projects\project\Source

13:15:16.356 INFO - Source encoding: UTF-8, default locale: en_GB

13:15:16.356 INFO - Index files

13:15:16.358 INFO - Excluded tests:

13:15:16.358 INFO - /.IntegrationTests//.*

13:15:16.358 INFO - /.UnitTests//.*

13:15:17.287 WARN - File '%s' is ignored. It is not located in module basedi r '%s'.

Any suggestions on how to solve this?

Goldcrest answered 16/5, 2014 at 13:25 Comment(0)
D
16

This may help (update: url no longer available: Alternative)

"Module base directory can be specified for special cases By default, the module base directory is guessed from the module identifier (like in the examples above). But it can be redefined using the sonar.projectBaseDir property."

Deguzman answered 17/5, 2014 at 7:15 Comment(5)
Thank you. I set the project.home & sonar.projectBaseDir to my soure folder. Still using the 2.3 runner now. Also the full path was required, relative didn't work, and had to change c:\path to c:/path. Also removed -D project.settings, since it is listed as not compatible with these options.Goldcrest
Do you have the latest link? The link present in the answer is outdatedHakeem
@SamuelAlexander This is the best page i could find: docs.sonarqube.org/display/SONAR/Analyzing+Source+CodeGoldcrest
All those links are brokenHarim
both the links not working, any updated link available to refer or even better if you can post a solution here itselfWallis

© 2022 - 2024 — McMap. All rights reserved.