Skip to content

Commit ba112de

Browse files
authored
Make nullable enabled by default across entire repo (#6960)
1 parent 96b7e04 commit ba112de

2,204 files changed

Lines changed: 3734 additions & 652 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build/Shared/EncodingUtility.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4-
#nullable enable
5-
64
namespace NuGet.Shared
75
{
86
internal static class EncodingUtility

build/Shared/EqualityUtility.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4-
#nullable enable
5-
64
using System;
75
using System.Collections.Generic;
86
using System.Diagnostics;

build/Shared/SimplePool.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4-
#nullable enable
5-
64
using System;
75
using System.Collections.Generic;
86

build/Shared/StringBuilderPool.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4-
#nullable enable
5-
64
using System.Text;
75

86
namespace NuGet

build/Shared/TaskResult.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4+
#nullable enable
5+
46
using System;
57
using System.Collections.Generic;
68
using System.Linq;
79
using System.Threading.Tasks;
810

911
namespace NuGet;
1012

11-
#nullable enable
12-
1313
internal static class TaskResult
1414
{
1515
/// <summary>

build/Shared/TaskResultCache.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3-
#nullable enable
4-
53
using System;
64
using System.Collections.Concurrent;
75
using System.Collections.Generic;

build/Shared/Utf8JsonReaderExtensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4+
#nullable disable
5+
46
using System;
57
using System.Text.Json;
68

build/Shared/Utf8JsonStreamReader.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4+
#nullable disable
5+
46
using System;
57
using System.Buffers;
68
using System.Collections.Generic;

build/common.project.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
<NoWarn Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(NoWarn);CS1998;CA1416;CS0618;CS1574</NoWarn>
5252
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
5353
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
54+
<Nullable>enable</Nullable>
5455
</PropertyGroup>
5556

5657
<!-- Defaults -->

src/NuGet.Clients/NuGet.CommandLine/CommandLineParser.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4+
#nullable disable
5+
46
using System;
57
using System.Collections.Generic;
68
using System.Diagnostics;

0 commit comments

Comments
 (0)