Skip to content

Commit 7839f46

Browse files
committed
2 parents 44633e5 + 540ee91 commit 7839f46

File tree

6 files changed

+17
-13
lines changed

6 files changed

+17
-13
lines changed

src/Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project>
33
<PropertyGroup>
4-
<Version>1.27.0</Version>
4+
<Version>1.27.1</Version>
55
<AssemblyVersion>1.0.0</AssemblyVersion>
66
<PackageTags>Polyfill</PackageTags>
77
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
88
<SignAssembly>false</SignAssembly>
9-
<NoWarn>CS1591;NETSDK1138;NU1901;NU1902</NoWarn>
9+
<NoWarn>CS1591;NETSDK1138;NU1901;NU1902;NU1903</NoWarn>
1010
<CheckEolTargetFramework>false</CheckEolTargetFramework>
1111
<LangVersion>11</LangVersion>
1212
<ImplicitUsings>false</ImplicitUsings>

src/Polyfill/Nullability/NullabilityInfo.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#nullable enable
66

77
using System.Linq;
8+
using System.Diagnostics.CodeAnalysis;
89
// Licensed to the .NET Foundation under one or more agreements.
910
// The .NET Foundation licenses this file to you under the MIT license.
1011

@@ -15,7 +16,8 @@ namespace System.Reflection
1516
/// <summary>
1617
/// A class that represents nullability info
1718
/// </summary>
18-
#if PolyPublic
19+
[ExcludeFromCodeCoverage]
20+
#if PolyPublic
1921
public
2022
#endif
2123
sealed class NullabilityInfo

src/Polyfill/Nullability/NullabilityInfoContext.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#nullable enable
66

77
using System.Linq;
8+
using System.Diagnostics.CodeAnalysis;
89
// Licensed to the .NET Foundation under one or more agreements.
910
// The .NET Foundation licenses this file to you under the MIT license.
1011

@@ -18,7 +19,8 @@ namespace System.Reflection
1819
/// Provides APIs for populating nullability information/context from reflection members:
1920
/// <see cref="ParameterInfo"/>, <see cref="FieldInfo"/>, <see cref="PropertyInfo"/> and <see cref="EventInfo"/>.
2021
/// </summary>
21-
#if PolyPublic
22+
[ExcludeFromCodeCoverage]
23+
#if PolyPublic
2224
public
2325
#endif
2426
sealed class NullabilityInfoContext

src/Tests/NullabilitySync.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public async Task Run()
4242
#nullable enable
4343
4444
using System.Linq;
45+
using System.Diagnostics.CodeAnalysis;
4546
4647
""";
4748

@@ -73,6 +74,7 @@ static string MakeInternal(string source) =>
7374
.Replace(
7475
"public sealed class",
7576
"""
77+
[ExcludeFromCodeCoverage]
7678
#if PolyPublic
7779
public
7880
#endif

src/Tests/PolyfillExtensionsTests_IEnumerable.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ public void Chunk_SizeOf3()
4646

4747
var chunks = enumerable.Chunk(3).ToList();
4848

49-
Assert.AreEqual(new int[] { 1, 2, 3 }, chunks[0]);
50-
Assert.AreEqual(new int[] { 4, 5, 6 }, chunks[1]);
51-
Assert.AreEqual(new int[] { 7, 8, 9 }, chunks[2]);
52-
Assert.AreEqual(new int[] { 10, 11 }, chunks[3]);
49+
Assert.AreEqual(new[] { 1, 2, 3 }, chunks[0]);
50+
Assert.AreEqual(new[] { 4, 5, 6 }, chunks[1]);
51+
Assert.AreEqual(new[] { 7, 8, 9 }, chunks[2]);
52+
Assert.AreEqual(new[] { 10, 11 }, chunks[3]);
5353
}
5454

5555
[Test]
@@ -59,8 +59,8 @@ public void Chunk_SizeOf8()
5959

6060
var chunks = enumerable.Chunk(8).ToList();
6161

62-
Assert.AreEqual(new int[] { 1, 2, 3, 4, 5, 6, 7, 8 }, chunks[0]);
63-
Assert.AreEqual(new int[] { 9, 10, 11 }, chunks[1]);
62+
Assert.AreEqual(new[] { 1, 2, 3, 4, 5, 6, 7, 8 }, chunks[0]);
63+
Assert.AreEqual(new[] { 9, 10, 11 }, chunks[1]);
6464
}
6565

6666
[Test]

src/Tests/UnreachableExceptionTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ namespace Tests;
44
public class UnreachableExceptionTests
55
{
66
[Test]
7-
public void UnreachableException_Compatiblity_with_all_TargetFrameworks()
8-
{
7+
public void UnreachableException_Compatibility_with_all_TargetFrameworks() =>
98
_ = Assert.Throws<UnreachableException>(() => throw new UnreachableException());
10-
}
119
}

0 commit comments

Comments
 (0)