Skip to content

Commit

Permalink
Remove <Nullable>enable</Nullable> and #nullable enable
Browse files Browse the repository at this point in the history
  • Loading branch information
v-wuzhai committed Dec 18, 2024
1 parent 7f7b91e commit f09fde9
Show file tree
Hide file tree
Showing 204 changed files with 0 additions and 336 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<DebugType>none</DebugType>
<GenerateDependencyFile>false</GenerateDependencyFile>
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>

<!-- NuGet -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>

<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>

<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion src/BuiltInTools/DotNetWatchTasks/DotNetWatchTasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion src/BuiltInTools/dotnet-format/dotnet-format.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<OutputType>Exe</OutputType>
<RootNamespace>Microsoft.CodeAnalysis.Tools</RootNamespace>
<ServerGarbageCollection>true</ServerGarbageCollection>
<Nullable>Enable</Nullable>
<NoWarn>$(NoWarn);8002</NoWarn>
<Description>Command line tool for formatting C# and Visual Basic code files based on .editorconfig settings.</Description>
<RollForward>LatestMajor</RollForward>
Expand Down
1 change: 0 additions & 1 deletion src/BuiltInTools/dotnet-watch/dotnet-watch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>
<UseAppHost>false</UseAppHost>
<RuntimeIdentifier />
<Nullable>enable</Nullable>

<!-- Avoid https://github.com/dotnet/arcade/issues/9305 -->
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

<!-- Avoid https://github.com/dotnet/arcade/issues/9305 -->
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
<RepositoryType>git</RepositoryType>
<DefineConstants Condition="'$(IncludeAspNetCoreRuntime)' == 'false'">$(DefineConstants);EXCLUDE_ASPNETCORE</DefineConstants>
<IsPackable>true</IsPackable>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<EnableStyleCopAnalyzer>true</EnableStyleCopAnalyzer>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DefineConstants>$(DefineConstants);WCWIDTH_VISIBILITY_INTERNAL</DefineConstants>
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>
<SignAssembly>true</SignAssembly>
Expand Down
1 change: 0 additions & 1 deletion src/Cli/dotnet-new3/dotnet-new3.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<EnableStyleCopAnalyzer>true</EnableStyleCopAnalyzer>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup Condition="'$(Configuration)' == 'Debug'">
Expand Down
2 changes: 0 additions & 2 deletions src/Cli/dotnet/commands/dotnet-run/RunCommand.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#nullable enable

using System.Reflection;
using Microsoft.Build.Evaluation;
using Microsoft.Build.Exceptions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#nullable enable

namespace Microsoft.DotNet.Tools.Test
{
internal sealed record CommandLineOptionMessage(string? Name, string? Description, bool? IsHidden, bool? IsBuiltIn);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable

namespace Microsoft.DotNet.Tools.Test
{
internal sealed record DiscoveredTestMessage(string? Uid, string? DisplayName);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable

namespace Microsoft.DotNet.Tools.Test
{
internal sealed record FileArtifactMessage(string? FullPath, string? DisplayName, string? Description, string? TestUid, string? TestDisplayName, string? SessionUid);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable

namespace Microsoft.DotNet.Tools.Test
{
internal sealed record HandshakeMessage(Dictionary<byte, string>? Properties) : IRequest, IResponse;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#nullable enable

namespace Microsoft.DotNet.Tools.Test;

internal sealed record ModuleMessage(string? DllOrExePath, string? ProjectPath, string? TargetFramework, string? RunSettingsFilePath, string IsTestingPlatformApplication) : IRequest;
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable

namespace Microsoft.DotNet.Tools.Test
{
internal sealed record SuccessfulTestResultMessage(string? Uid, string? DisplayName, byte? State, long? Duration, string? Reason, string? StandardOutput, string? ErrorOutput, string? SessionUid);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable

namespace Microsoft.DotNet.Tools.Test
{
internal sealed record TestSessionEvent(byte? SessionType, string? SessionUid, string? ExecutionId) : IRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.

#if NETCOREAPP
#nullable enable
using System.Buffers;
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.

#if NETCOREAPP
#nullable enable
#endif

using System.Diagnostics;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.

#if NETCOREAPP
#nullable enable
#endif

using System.Diagnostics;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.

#if NETCOREAPP
#nullable enable
#endif

using System.Diagnostics;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.

#if NETCOREAPP
#nullable enable
#endif

using System.Diagnostics;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

#nullable enable

using System.Diagnostics;

namespace Microsoft.DotNet.Tools.Test
Expand Down
2 changes: 0 additions & 2 deletions src/Cli/dotnet/commands/dotnet-test/Models.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#nullable enable

namespace Microsoft.DotNet.Cli
{
internal sealed record Module(string? DllOrExePath, string? ProjectPath, string? TargetFramework, string? RunSettingsFilePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
using Microsoft.DotNet.Workloads.Workload.Install;
using Microsoft.NET.Sdk.WorkloadManifestReader;

#nullable enable

namespace Microsoft.DotNet.Workloads.Workload.Config
{
internal class WorkloadConfigCommand : WorkloadCommandBase
Expand Down
5 changes: 0 additions & 5 deletions src/Common/CliFolderPathCalculatorCore.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

//only Microsoft.DotNet.MSBuildSdkResolver (net7.0) has nullables enabled
#pragma warning disable IDE0240 // Remove redundant nullable directive
#nullable enable
#pragma warning restore IDE0240 // Remove redundant nullable directive

namespace Microsoft.DotNet.Configurer
{
static class CliFolderPathCalculatorCore
Expand Down
4 changes: 0 additions & 4 deletions src/Common/EnvironmentVariableNames.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#pragma warning disable IDE0240 // Nullable directive is redundant (when file is included to a project that already enables nullable
#nullable enable
#pragma warning restore IDE0240

namespace Microsoft.DotNet.Cli
{
static class EnvironmentVariableNames
Expand Down
4 changes: 0 additions & 4 deletions src/Common/WorkloadFileBasedInstall.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#pragma warning disable IDE0240
#nullable enable
#pragma warning restore IDE0240

using System.Text.Json;
#if DotnetCsproj
using Microsoft.DotNet.Workloads.Workload.History;
Expand Down
1 change: 0 additions & 1 deletion src/Compatibility/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<Import Project="..\..\Directory.Build.props" />

<PropertyGroup>
<Nullable>enable</Nullable>
<StrongNameKeyId>Open</StrongNameKeyId>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

<!-- While in prerelease, ship the symbols to everyone all the time. -->
<DebugType>embedded</DebugType>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);CS8002</NoWarn>
<StrongNameKeyId>MicrosoftShared</StrongNameKeyId>
<SignAssembly>true</SignAssembly>
Expand Down
1 change: 0 additions & 1 deletion src/Containers/containerize/containerize.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<TargetFramework>$(SdkTargetFramework)</TargetFramework>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<StrongNameKeyId>MicrosoftShared</StrongNameKeyId>
<SignAssembly>true</SignAssembly>
<ExcludeFromSourceOnlyBuild>true</ExcludeFromSourceOnlyBuild>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>
<!-- Create FileDefinitions items for ResolveHostfxrCopyLocalContent target -->
<EmitLegacyAssetsFileItems>true</EmitLegacyAssetsFileItems>
<Nullable>enable</Nullable>
<!-- https://github.com/dotnet/sdk/issues/14801 -->
<AssemblyVersion Condition="'$(TargetFramework)' == 'net472'">5.0.100.0</AssemblyVersion>
</PropertyGroup>
Expand Down
1 change: 0 additions & 1 deletion src/Microsoft.Win32.Msi/Microsoft.Win32.Msi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFrameworks>$(SdkTargetFramework);net472</TargetFrameworks>
<Nullable>enable</Nullable>
<OutputType>library</OutputType>
<RootNamespace>Microsoft.Win32.Msi</RootNamespace>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#pragma warning disable IDE0240 // Remove redundant nullable directive
#nullable enable
#pragma warning restore IDE0240 // Remove redundant nullable directive

namespace Microsoft.DotNet.MSBuildSdkResolver
{
// Note: This is SemVer 2.0.0 https://semver.org/spec/v2.0.0.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<AssemblyVersion>8.0.100.0</AssemblyVersion>
<TargetFramework>net472</TargetFramework>
<StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId>
<Nullable>enable</Nullable>
<!-- Create FileDefinitions items for ResolveHostfxrCopyLocalContent target -->
<EmitLegacyAssetsFileItems>true</EmitLegacyAssetsFileItems>
<!-- For product build, this project only builds in the second build pass as it depends on assets from other
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<TargetFrameworks>$(ResolverTargetFramework);net472</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<!-- Create FileDefinitions items for ResolveHostfxrCopyLocalContent target -->
<EmitLegacyAssetsFileItems>true</EmitLegacyAssetsFileItems>
<RootNamespace>Microsoft.DotNet.DotNetSdkResolver</RootNamespace>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#pragma warning disable IDE0240
#nullable enable
#pragma warning restore IDE0240

using Microsoft.Build.Framework;
using Microsoft.NET.Sdk.WorkloadManifestReader;
using System.Collections.Immutable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#pragma warning disable IDE0240
#nullable enable
#pragma warning restore IDE0240

using Microsoft.Build.Framework;
using Microsoft.NET.Sdk.WorkloadManifestReader;
using Microsoft.DotNet.Configurer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#pragma warning disable IDE0240
#nullable enable
#pragma warning restore IDE0240

namespace Microsoft.NET.Sdk.WorkloadManifestReader
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#pragma warning disable IDE0240
#nullable enable
#pragma warning restore IDE0240

namespace Microsoft.NET.Sdk.WorkloadManifestReader
{
public interface IWorkloadResolver
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#pragma warning disable IDE0240
#nullable enable
#pragma warning restore IDE0240

namespace Microsoft.NET.Sdk.WorkloadManifestReader
{
public struct ManifestId : IEquatable<ManifestId>, IComparable<ManifestId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#pragma warning disable IDE0240
#nullable enable
#pragma warning restore IDE0240

using Microsoft.DotNet.MSBuildSdkResolver;
using Strings = Microsoft.NET.Sdk.Localization.Strings;

Expand Down
Loading

0 comments on commit f09fde9

Please sign in to comment.