InspectCode presents different results than ReSharper

There could be the following reasons for different results of the InspectCode tool and ReSharper in Visual Studio (ReShaper | Inspect | Code Issues in Solution):

  1. By default, the Solution Wide Error Analysis (SWEA) is disabled in ReSharper, but enabled in InspectCode. You may either turn SWEA on in ReSharper (ReSharper | Options | Code Inspection | Settings | Enable solution-wide analysis) or add --no-swea key to turn SWEA off in InspectCode.
  2. Please check that InspectCode uses the same dotSettings files as ReSharper. You can specify dotSettings file for InspectCode explicitly by adding --profile in the command line in case you are running InspectCode on a different machine.
  3. By default, inspections with Hint severity aren't shown in InspectCode output. To change this, please add --severity="INFO" in the command line, run InspectCode on the solution, and check the results.
  4. Spelling issues are not shown in InspectCode results, here's a corresponding request - RSRP-471421. As a workaround, you can disable ReSpeller in ReSharper | Options | Environment | Products & Features | Features.
  5. Please check that the same toolset is used for InspectCode and ReSharper. ReSharper sets toolset according to Visual Studio version, while InspectCode is run as a standalone application and cannot get C# language level set for the solution.
  6. There are some known issues with unit testing inspections in InspectCode:

If you checked and fixed all the steps above, but still get different results, please contact us via a “Submit Request” button at the top of the page. Please attach:

  • A full command line used for running InspectCode.
  • An output file from InspectCode.
  • An XML file for ReSharper inspection results (Export button in Inspection Results window).
  • dotSettings files for each layer collected via ReSharper | Manage Options | right-click on each layer | Export to file.
  • A demo solution will be also very helpful in reproducing the issue.
3 out of 3 found this helpful

Please sign in to leave a comment.

Have more questions?

Submit a request