diff --git a/Directory.Build.props b/Directory.Build.props index 6669bd9..24400a6 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -40,14 +40,16 @@ CS1712: Type parameter has no matching typeparam tag in the XML comment CS1723: XML comment has cref attribute that refers to a type parameter CS1734: XML comment has a paramref tag, but there is no parameter by that name - xUnit1012: Null should not be used for type parameter - xUnit2021: Assert.ThrowsAsync is async. The resulting task should be awaited + NUnit*: NUnit Analyzers IL2***: Trim Warnings IL3***: AOT Warnings--> nullable, CS0419,CS1570,CS1571,CS1572,CS1573,CS1574,CS1580,CS1581,CS1584,CS1587,CS1589,CS1590,CS1591,CS1592,CS1598,CS1658,CS1710,CS1711,CS1712,CS1723,CS1734, - xUnit1012,xUnit2021, + NUnit1001,NUnit1002,NUnit1003,NUnit1004,NUnit1005,NUnit1006,NUnit1007,NUnit1008,NUnit1009,NUnit1010,NUnit1011,NUnit1012,NUnit1013,NUnit1014,NUnit1015,NUnit1016,NUnit1017,NUnit1018,NUnit1019,NUnit1020,NUnit1021,NUnit1022,NUnit1023,NUnit1024,NUnit1025,NUnit1026,NUnit1027,NUnit1028,NUnit1029,NUnit1030,NUnit1031,NUnit1032,NUnit1033, + NUnit2001,NUnit2002,NUnit2003,NUnit2004,NUnit2005,NUnit2006,NUnit2007,NUnit2008,NUnit2009,NUnit2010,NUnit2011,NUnit2012,NUnit2013,NUnit2014,NUnit2015,NUnit2016,NUnit2017,NUnit2018,NUnit2019,NUnit2020,NUnit2021,NUnit2022,NUnit2023,NUnit2024,NUnit2025,NUnit2026,NUnit2027,NUnit2028,NUnit2029,NUnit2030,NUnit2031,NUnit2032,NUnit2033,NUnit2034,NUnit2035,NUnit2036,NUnit2037,NUnit2038,NUnit2039,NUnit2040,NUnit2041,NUnit2042,NUnit2043,NUnit2044,NUnit2045,NUnit2046,NUnit2047,NUnit2048,NUnit2049,NUnit2050, + NUnit3001,NUnit3002,NUnit3003,NUnit3004, + NUnit4001 IL2001,IL2002,IL2003,IL2004,IL2005,IL2006,IL2007,IL2008,IL2009, IL2010,IL2011,IL2012,IL2013,IL2014,IL2015,IL2016,IL2017,IL2018,IL2019, IL2020,IL2021,IL2022,IL2023,IL2024,IL2025,IL2026,IL2027,IL2028,IL2029, @@ -62,7 +64,7 @@ IL2110,IL2111,IL2112,IL2113,IL2114,IL2115,IL2116,IL2117,IL2118,IL2119, IL2120,IL2121,IL2122, IL3050,IL3051,IL3052,IL3053,IL3054,IL3055,IL3056 - + diff --git a/samples/CommunityToolkit.Maui.Markup.Sample/AppShell.cs b/samples/CommunityToolkit.Maui.Markup.Sample/AppShell.cs index 3526318..5eb5a0a 100644 --- a/samples/CommunityToolkit.Maui.Markup.Sample/AppShell.cs +++ b/samples/CommunityToolkit.Maui.Markup.Sample/AppShell.cs @@ -4,12 +4,12 @@ namespace CommunityToolkit.Maui.Markup.Sample; class AppShell : Shell { - static readonly IReadOnlyDictionary pageRouteMappingDictionary = new Dictionary(new[] - { + static readonly IReadOnlyDictionary pageRouteMappingDictionary = new Dictionary( + [ CreateRoutePageMapping(), CreateRoutePageMapping(), - CreateRoutePageMapping(), - }); + CreateRoutePageMapping() + ]); public AppShell(NewsPage newsPage) { diff --git a/samples/CommunityToolkit.Maui.Markup.Sample/ViewModels/NewsViewModel.cs b/samples/CommunityToolkit.Maui.Markup.Sample/ViewModels/NewsViewModel.cs index fe8dcb7..7850b13 100644 --- a/samples/CommunityToolkit.Maui.Markup.Sample/ViewModels/NewsViewModel.cs +++ b/samples/CommunityToolkit.Maui.Markup.Sample/ViewModels/NewsViewModel.cs @@ -26,7 +26,7 @@ sealed partial class NewsViewModel : BaseViewModel, IDisposable remove => pullToRefreshEventManager.RemoveEventHandler(value); } - public ObservableCollection TopStoryCollection { get; } = new(); + public ObservableCollection TopStoryCollection { get; } = []; public void Dispose() { diff --git a/src/CommunityToolkit.Maui.Markup.UnitTests/AutomationPropertiesExtensionsTests.cs b/src/CommunityToolkit.Maui.Markup.UnitTests/AutomationPropertiesExtensionsTests.cs index 027c2ab..ced9dc4 100644 --- a/src/CommunityToolkit.Maui.Markup.UnitTests/AutomationPropertiesExtensionsTests.cs +++ b/src/CommunityToolkit.Maui.Markup.UnitTests/AutomationPropertiesExtensionsTests.cs @@ -12,7 +12,7 @@ class AutomationPropertiesExtensionsTests : BaseMarkupTestFixture