Parse errors for .inc files

SonarQube Version: 7.9.1
SonarQube Scanner 4.1.0.1829
SonarScanner for MSBuild 4.7.1

SonarQube scan of one of our project is failing with error unable to parse .inc files.

Since we don’t really want them and .asp files to be scanned, I tried specifying exclusions as /d:sonar.exclusions=**/*.inc,**/*.asp but that doesn’t seem to be working.

Further, in the end analysis is failing with another error - I am clueless as to which illegal character is being referred to here -

How do I resolve these issues?

Hello @gischethans,

Can you provide:
1- The full SonarScanner.MSBuild.exe command that you are running.
2- The full result of the log running in verbose mode( /d:sonar.verbose=true) instead of a partial screenshot.
3- what is this SonarQubeCppOutput? are you defining it?

If the logs contain sensitive information let me know you can share them privately.

Thanks,

Hello @Abbas_Sabra, I would like to share the logs privately.

The SonarQubeCppOutput thing, somebody else did it this way for MSBuild installation in the Jenkins configuration -

@gischethans, The shared logs showed problem in the scanner options:

sonar.exclusions was defined to this:
**/.inc, **/.asp/d:sonar.cfamily.build-wrapper-output=SonarQubeCppOutput/d:sonar.svn.username=/d:sonar.svn.password.secured=/d:sonar.plsql.file.suffixes=.pks, .pkb/d:sonar.verbose=true

Which lead to:

16:29:43 The only way to get an accurate analysis of C/C++/Objective-C files is by using the SonarSource build-wrapper
16:29:43 and setting the property "sonar.cfamily.build-wrapper-output", but it was not specified.

I consider this post as resolved if you face further problem please create a new thread.

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