Skip to content

Commit

Permalink
[XC] split warnings on ',' and ';'
Browse files Browse the repository at this point in the history
- fixes #20568
  • Loading branch information
StephaneDelcroix committed Feb 14, 2024
1 parent 4023296 commit e403082
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Controls/src/Build.Tasks/XamlCTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static void SetContext(this TaskLoggingHelper loggingHelper, int warningL
Context.WarningLevel = warningLevel;
Context.TreatWarningsAsErrors = treatWarningsAsErrors;

Context.NoWarn = noWarn?.Split([';'], StringSplitOptions.RemoveEmptyEntries).Select(s =>
Context.NoWarn = noWarn?.Split([';', ','], StringSplitOptions.RemoveEmptyEntries).Select(s =>
{
if (int.TryParse(s, out var i))
return i;
Expand All @@ -50,7 +50,7 @@ public static void SetContext(this TaskLoggingHelper loggingHelper, int warningL
return -1;
}).Where(i => i != -1).ToList();

Context.WarningsAsErrors = warningsAsErrors?.Split([';'], StringSplitOptions.RemoveEmptyEntries).Select(s =>
Context.WarningsAsErrors = warningsAsErrors?.Split([';', ','], StringSplitOptions.RemoveEmptyEntries).Select(s =>
{
if (int.TryParse(s, out var i))
return i;
Expand All @@ -63,7 +63,7 @@ public static void SetContext(this TaskLoggingHelper loggingHelper, int warningL
return -1;
}).Where(i => i != -1).ToList();

Context.WarningsNotAsErrors = warningsNotAsErrors?.Split([';'], StringSplitOptions.RemoveEmptyEntries).Select(s =>
Context.WarningsNotAsErrors = warningsNotAsErrors?.Split([';', ','], StringSplitOptions.RemoveEmptyEntries).Select(s =>
{
if (int.TryParse(s, out var i))
return i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<AssemblyName>Microsoft.Maui.Controls.Xaml.UnitTests</AssemblyName>
<WarningLevel>4</WarningLevel>
<NoWarn>$(NoWarn);0672;0219;0414;CS0436;CS0618</NoWarn>
<WarningsNotAsErrors>$(WarningsNotAsErrors);XC0618;XC0022;XC0023</WarningsNotAsErrors>
<WarningsNotAsErrors>$(WarningsNotAsErrors);XC0618;XC0022,XC0023</WarningsNotAsErrors>
<IsPackable>false</IsPackable>
<DisableMSBuildAssemblyCopyCheck>true</DisableMSBuildAssemblyCopyCheck>
</PropertyGroup>
Expand Down

0 comments on commit e403082

Please sign in to comment.