Resharper and code quality


Warewolf code quality is maintained using Resharper.

To analyse your contribution for consistency with the existing code you must have Resharper downloaded and installed and have the following two Resharper plugins installed:


To install the required Resharper Plugins:

  1. Click the Resharper menu
    Image 108

  2. Select Extension Manager...from the sub menu.
    Image 109

  3. Search for CleanCode from Online/All. And install it.
  4. Image 110

  5. Repeat step 3 for PowerToys: Cyclomatic Complexity.
    Image 111

To apply the Warewolf Resharper settings to Visual Studio:

  1. Click the Resharper menu
    Image 112

  2. Select Manage Options...from the sub menu.
    Image 113

  3. Select a Settings Layer. Be vary careful not to select a layer where you already have Resharper settings or templates you that you want to keep. See Configuring Settings Layers. If you don't mind overriding existing settings then click Reset All Settings and select the This Computer layer.
    Image 114

  4. Select Import from File... from the Import / Export Settings sub menu.
    Image 115

  5. If you have downloaded the Warewolf git repository you will already have the file "Resharper.dotSettings" in the root of the Warewolf git repository. Otherwise first download a local copy of the repository to get the Resharper settings you need.

Important concepts to remember with Resharper:

  1. Just because your contribution is clean according to Resharper doesn't mean that you have not introduced any new code quality concerns, you should also use Resharper to check the other parts of Warewolf that you've referenced and make sure you are using them correctly.
  2. Resharper settings layers are cumulative in nature. See: Resulting Settings

Dieser Artikel war hilfreich für 2 Personen. Ist dieser Artikel hilfreich?