Skip to content

Troubleshooting problems with C or Cpp analysis

duncanp-sonar edited this page Apr 17, 2020 · 6 revisions

Starting with version 4.21, it is possible to create a "reproducer" file for C/C++ analysis. A reproducer file contains diagnostic information to help the developers at SonarSource investigate problems that occur during C/C++ analysis.

If you encounter a problem with C/C++ analysis, please contact us in the community forum and include the reproducer file.

Creating a reproducer file for the Active Document

To create a reproducer:

  • open the C/C++ file that is not being analysed correctly
  • open Visual Studio's Command Window, found under View -> Other Windows -> Command Window.
  • type in the command window "Analyze.SonarLint.CFamily.CreateReproducer":

Create reproducer command

You can then view the location of the created reproducer file in the SonarLint Output pane:

Reproducer information in the SonarLint output pane.

Notes:

  • the reproducer file is regenerated each time the command is invoked. Invoking the command will overwrite the previous reproducer file.
  • running the reproducer will only produce the reproducer file. It will not report any issues for the active C/C++ file.
Clone this wiki locally