With some larger code bases it is impossible to export a formatted ReSharper report due to the fact that it crashes Visual Studio. For this reason the report is often exported as XML and then transformed using XSLT. Unfortunately, there is not an XSLT provided by default and therefore you must create your own.
The goal of this project is to provide an XSLT for beautifying said reports for distribution to the stakeholders of a project.
If you would like to make use of the Powershell script you will first need to install the following prerequisites on your system and have them accessible globally from the command line. My suggestion is that you make use of the Chocolatey package manager for Windows to install the ReSharper command line tools.
- Saxon
- Chocolatey Package
choco install saxonhe
- ReSharper CLT
- Chocolatey Package
choco install resharper-clt
TBD.
dupfinder --config={my-config-file} --output={my-output-name} {my-solution-file}
dupfinder --config=dupfinder.config --output=report.xml MyProduct.sln
transform -s:{xml-file} -xsl:{xsl-file} -o:{report-file}
transform -s:report.xml -xsl:DuplicateFinder.xsl -o:report.html
You should supply a .DotSettings file alongside your solution or project
file. This file can be generated by using the ReSharper project in Visual
Studio.
inspectcode --output={report-file} --format=xml {solution-file}
inspectcode --output=report.xml --format=xml MySolution.sln
transform -s:{xml-file} -xsl:{xsl-file} -o:{report-file}
transform -s:report.xml -xsl:InspectCode.xsl -o:report.html