开发者

ReSharper - Is there any way to save code quality recommendations to a file?

开发者 https://www.devze.com 2023-03-22 01:26 出处:网络
I\'m probably using the wrong terminology but basically I would like to dump the findings from the panel to the right of the scrollbar to a file for later review. See the screenshot below for what I m

I'm probably using the wrong terminology but basically I would like to dump the findings from the panel to the right of the scrollbar to a file for later review. See the screenshot below for what I mean. I开发者_如何转开发t's the part of the screen with the orange and green lines on. Does anyone know if this is possible?

ReSharper - Is there any way to save code quality recommendations to a file?

If anyone is interested I have filed a feature request for this with JetBrains here.


As far as I know it's not possible, at least with the built in features. Maybe it's possible by writing a plugin.

The only thing which I know to get something like this:

  • Goto the 'Code Issues' Inspector: Resharper->Code Issues in Current Solution or any other of these options
  • On the window which shows the issues is a 'Export' button. With that button you can export the issues of the project/solution/file.

The report format is pretty simple list of issues as text. Like this:

5 issues found
  Common Practices and Code Improvements (1 issue)
    <DemoApp>\Program.cs (1 issue)
      Property 'Title' can be made private
  Potential Code Quality Issues (4 issues)
    <DemoApp>\Program.cs (4 issues)
      Auto-implemented property accessor is never used
      Auto-implemented property accessor is never used
      Class 'Comment' is never instantiated
      Class 'Program' is never instantiated


It's now possible to use Resharper's Command Line to produce a xml with the issues on a given solution.

It's not exactly the 'export' functionality you wanted, but it might be useful still.

You just have to run the tool and pass the file where it will save the issues. For example:

inspectcode /o="D:\Resharper\MyIssues.xml" [PathToSolutionFile]

I've noticed this produces more issues than the plugin inside Visual Studio does, for some reason. I really think the Resharper's team should concentrate on using the same code to analyze the files instead of different implementations like it seems to be now.

0

精彩评论

暂无评论...
验证码 换一张
取 消