Skip to content

Commit 3b0671c

Browse files
cataggarJamieMagee
andauthored
enable nullable by default (#1471)
* enable Nullable * removed some #nullable * undo namespace changes * undo Copilot namespace changes * add back #nullable disables * Add missing `#nullable disable` directives --------- Co-authored-by: Jamie Magee <[email protected]>
1 parent c9d95ec commit 3b0671c

File tree

421 files changed

+434
-7
lines changed

Some content is hidden

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

421 files changed

+434
-7
lines changed

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,12 @@ dotnet_diagnostic.CA1851.severity = suggestion
697697
# CA1861: Avoid constant arrays as arguments
698698
dotnet_diagnostic.CA1861.severity = suggestion
699699

700+
# IDE0240: Nullable directive is redundant
701+
dotnet_diagnostic.IDE0240.severity = suggestion
702+
703+
# IDE0241: Nullable directive is unnecessary
704+
dotnet_diagnostic.IDE0241.severity = suggestion
705+
700706
# Workaround for https://github.com/dotnet/roslyn-analyzers/issues/5628
701707
[Program.cs]
702708
dotnet_diagnostic.ca1812.severity = none

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<AnalysisLevel>latest</AnalysisLevel>
99
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
1010
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
11+
<Nullable>enable</Nullable>
1112
</PropertyGroup>
1213

1314
<PropertyGroup Label="Package">

src/Microsoft.ComponentDetection.Common/Column.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#nullable disable
12
namespace Microsoft.ComponentDetection.Common;
23

34
public class Column

src/Microsoft.ComponentDetection.Common/CommandLineInvocationService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#nullable disable
12
namespace Microsoft.ComponentDetection.Common;
23

34
using System;

src/Microsoft.ComponentDetection.Common/ComponentComparer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#nullable disable
12
namespace Microsoft.ComponentDetection.Common;
23

34
using System.Collections.Generic;

src/Microsoft.ComponentDetection.Common/ComponentStream.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#nullable disable
12
namespace Microsoft.ComponentDetection.Common;
23

34
using System.IO;

src/Microsoft.ComponentDetection.Common/ComponentStreamEnumerable.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#nullable disable
12
namespace Microsoft.ComponentDetection.Common;
23

34
using System;

src/Microsoft.ComponentDetection.Common/DependencyGraph/ComponentRecorder.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#nullable disable
12
using System;
23
using System.Collections.Concurrent;
34
using System.Collections.Generic;

src/Microsoft.ComponentDetection.Common/DependencyGraph/DependencyGraph.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#nullable disable
12
using System;
23
using System.Collections.Concurrent;
34
using System.Collections.Generic;

src/Microsoft.ComponentDetection.Common/DirectoryItemFacade.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#nullable disable
12
namespace Microsoft.ComponentDetection.Common;
23

34
using System.Collections.Generic;

0 commit comments

Comments
 (0)