diff options
author | Matt Ward <matt.ward@microsoft.com> | 2020-01-02 16:53:27 +0300 |
---|---|---|
committer | Matt Ward <matt.ward@microsoft.com> | 2020-01-02 16:53:27 +0300 |
commit | 0990511ae1b7a4bcfada1ea2a376e7e16bfd92b2 (patch) | |
tree | 04cdd85babb49a4029bd6ee1f58b8c757d07f76a /main/tests/test-projects | |
parent | 9161a9aa6a9c8cea7aa732444e5b72190b1d2701 (diff) |
[C#] NoWarn in project should override rulesets
NoWarn settings for suppressing warnings was not overridding the
configuration defined in the ruleset. This was incorrect based on the
Visual Studio on Windows behaviour.
Diffstat (limited to 'main/tests/test-projects')
-rw-r--r-- | main/tests/test-projects/ruleset/custom.ruleset | 2 | ||||
-rw-r--r-- | main/tests/test-projects/ruleset/ruleset.csproj | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/main/tests/test-projects/ruleset/custom.ruleset b/main/tests/test-projects/ruleset/custom.ruleset index 6411b72e21..0d7baaab51 100644 --- a/main/tests/test-projects/ruleset/custom.ruleset +++ b/main/tests/test-projects/ruleset/custom.ruleset @@ -4,5 +4,7 @@ <Rule Id="SA1000" Action="Error" /> <Rule Id="SA1001" Action="Warning" /> <Rule Id="SA1002" Action="None" /> + <!-- Rule SA1003 defined in global ruleset --> + <Rule Id="SA1600" Action="Error" /> </Rules> </RuleSet>
\ No newline at end of file diff --git a/main/tests/test-projects/ruleset/ruleset.csproj b/main/tests/test-projects/ruleset/ruleset.csproj index 7b266eaccb..b4779cd891 100644 --- a/main/tests/test-projects/ruleset/ruleset.csproj +++ b/main/tests/test-projects/ruleset/ruleset.csproj @@ -9,6 +9,7 @@ <AssemblyName>ruleset</AssemblyName> <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <CodeAnalysisRuleSet>custom.ruleset</CodeAnalysisRuleSet> + <NoWarn>SA1600</NoWarn> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> |