-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CxxReportSensor.java: file not found for issue #693
Comments
@Bertk you use this kind of module structure, i tough you had no issues with this. @guwirth perhaps we should use the same approach as the report lookup, use reactor to lookup from root of the project and if not found search using the fs.baseDir to get to root of the module. @BobSilent i dont think using your suggestion will cover all scenarios we support, you can try to make a pull request and see if the integration tests pass, pretty sure they dont |
On this page https://github.com/SonarOpenCommunity/sonar-cxx/wiki/Path-and-path-separator-issues is also a description how MultiModule setup should work. I don't use it so I have no experience with it. |
Please use 'FC' compiler option (https://msdn.microsoft.com/en-us/library/19z1t1wy.aspx) which creates full path information in the VC log files. We use the multi module configuration and use identical names in several projects which is ambiguous without the full path. |
My feeling is also that fs.baseDir().getAbsolutePath() is right? |
Do we have a PR? I want to test it and maybe this might also be useful for #509. |
Can the multi module sample we have in integrations test be used to check On Wed, Dec 2, 2015, 18:12 Bert [email protected] wrote:
|
please try again with 0.9.5:
|
Hi,
the visualStudio c++ compiler writes the compiler warnings without absolute path information into the log file, if the source file (which has an issue) belongs to my vcxproj.
Example
unfortunately the source file ccc.cpp is not found, as in
CxxReportSensor.java (sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/utils/CxxReportSensor.java)
you are using
for resolving the root directory,
if I change it to
everything can be resolved.
also other sensors, e.g. java use fs.baseDir
sonar-java/java-surefire/src/main/java/org/sonar/plugins/surefire/api/SurefireUtils.java
sonar-java/java-jacoco/src/main/java/org/sonar/plugins/jacoco/JaCoCoOverallSensor.java
Some other side aspects: i am using the following directory structure
() one root project properties
(*) module properties, in parallel to the vcxproj
reactor.getRoot().getBaseDir().getAbsolutePath() is always "" same as location of ()
fs.baseDir().getAbsolutePath() is e.g. "\module1" location of module1 directory (*)
Why do you use "reactor.getRoot().getBaseDir()"?
Can it be changed to "fs.baseDir()"
The text was updated successfully, but these errors were encountered: