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/src/addins | |
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/src/addins')
-rw-r--r-- | main/src/addins/CSharpBinding/MonoDevelop.CSharp.Project/CSharpCompilerParameters.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Project/CSharpCompilerParameters.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Project/CSharpCompilerParameters.cs index 8c4ba7d7d8..965dd89dd2 100644 --- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Project/CSharpCompilerParameters.cs +++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Project/CSharpCompilerParameters.cs @@ -192,8 +192,6 @@ namespace MonoDevelop.CSharp.Project Dictionary<string, ReportDiagnostic> GetSpecificDiagnosticOptions () { var result = new Dictionary<string, ReportDiagnostic> (); - foreach (var warning in GetSuppressedWarnings ()) - result [warning] = ReportDiagnostic.Suppress; var globalRuleSet = IdeApp.TypeSystemService.RuleSetManager.GetGlobalRuleSet (); if (globalRuleSet != null) { @@ -204,6 +202,11 @@ namespace MonoDevelop.CSharp.Project if (ruleSet != null) { AddSpecificDiagnosticOptions (result, ruleSet); } + + foreach (var warning in GetSuppressedWarnings ()) { + result [warning] = ReportDiagnostic.Suppress; + } + return result; } |