-
Notifications
You must be signed in to change notification settings - Fork 3
WarningLevel
Andrey Lipatkin edited this page Feb 8, 2015
·
5 revisions
Rule checks that all project within solution have specified warning level or higher. Exceptions are supported (see example below). More details about warning level can be found here: https://msdn.microsoft.com/en-us/library/13b90fz7.aspx
It enforces more strict code policy.
<Rules>
...
<WarningLevel enabled="true">
<MinimalValue>4</MinimalValue>
<Exception>
<Project>ProjectThatIsAllowedToHaveWarningLevel_2.csproj</Project>
<MinimalValue>2</MinimalValue>
</Exception>
<Exception>
<Project>AnotherProjectToFullyExcludeFromChecks.csproj</Project>
</Exception>
</WarningLevel>
...
</Rules>
- Basic Rules
- FilesIncludedIntoProject
- SameNameForAssemblyAndRootNamespace
- SuppressWarnings
- TargetFrameworkProfile
- TargetFrameworkVersion
- TreatWarningsAsErrors
- WarningLevel
- NuGet Rules
- NuGetAutomaticPackagesRestore
- NuGetPackagesUsage
- NuGetPackageVersions
- ReferenceNuGetPackagesOnly
- SameNuGetPackageVersions
- StyleCop Rules
- StyleCopEnabled
- TreatStyleCopWarningsAsErrors