Skip to content

Nosnitor Project Standards

Jeff Block edited this page Mar 21, 2019 · 6 revisions

The ProjectStandards project packages Code Analysis rulesets for use by applications into NuGet package(s). The following rulesets are included:

Ruleset Description
Nosnitor.ruleset The primary code analysis ruleset used by Nosnitor applications.
Nosnitor.TestProject.ruleset The primary code analysis ruleset used by Nosnitor test assemblies.

Important Links

Usage

Add the ProjectStandards package to your project and the applicable code analysis ruleset will automatically be applied when code analysis is run.

The ruleset that is applied is determined based on the following conditions:

  1. Defined by UseTestProjectStandards variable in the project file. For example, in a TestProject.csproj:

    <PropertyGroup>
    	<UseTestProjectStandards>True</UseTestProjectStandards>
    </PropertyGroup>
    

    If set, this value will override all other conditions.

  2. Defined by test project type.

    The project definition contians elements that indicate that the project is a test project. The following elements are used:

    • ProjectTypeGuids contains Test project type (3AC096D0-A1C2-E12C-1390-A8335801FDAB).
    • TestProjectType is defined.
    • IsCodedUITest is true.
  3. Default to Nosnitor.ruleset.

    If none of the other conditions are met, the Nosnitor.ruleset file will be used.

Clone this wiki locally