Skip to content

Commit

Permalink
Enabled nullable in the entire project and removed explicit #nullable…
Browse files Browse the repository at this point in the history
… statements
  • Loading branch information
grahamboree committed Sep 2, 2024
1 parent b841aec commit 2f1a90c
Show file tree
Hide file tree
Showing 21 changed files with 4 additions and 42 deletions.
2 changes: 0 additions & 2 deletions src/DarkConfig/Attributes.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System;

namespace DarkConfig {
Expand Down
2 changes: 0 additions & 2 deletions src/DarkConfig/ConfigFileInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System;

namespace DarkConfig {
Expand Down
2 changes: 0 additions & 2 deletions src/DarkConfig/ConfigProcessor.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

namespace DarkConfig {
/// Processors can modify DocNodes after being parsed from YAML, but before used by the rest of the systems
/// Note: this is ONLY run on the YAML -> DocNode path, any other DocNode creation is not affected
Expand Down
2 changes: 0 additions & 2 deletions src/DarkConfig/ConfigSource.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System.Collections;
using System.Collections.Generic;
using System.Linq;
Expand Down
2 changes: 0 additions & 2 deletions src/DarkConfig/Configs.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System;
using System.Collections;
using System.IO;
Expand Down
7 changes: 4 additions & 3 deletions src/DarkConfig/DarkConfig.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- These need to match what Unity is using! -->
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>disable</ImplicitUsings>
<Nullable>disable</Nullable>
<LangVersion>9</LangVersion>

<ImplicitUsings>disable</ImplicitUsings>
<Nullable>enable</Nullable>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<OutputPath>..\..\bin\$(Configuration)</OutputPath>
<LangVersion>9</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions src/DarkConfig/DocNode/ComposedDocNode.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
Expand Down
2 changes: 0 additions & 2 deletions src/DarkConfig/DocNode/DocNode.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
Expand Down
1 change: 0 additions & 1 deletion src/DarkConfig/DocNode/YamlDocNode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#nullable enable
using System;
using System.Collections;
using System.Collections.Generic;
Expand Down
2 changes: 0 additions & 2 deletions src/DarkConfig/Exceptions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System;
using System.IO;

Expand Down
2 changes: 0 additions & 2 deletions src/DarkConfig/FileSource.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System;
using System.Collections;
using System.IO;
Expand Down
2 changes: 0 additions & 2 deletions src/DarkConfig/Internal/BuiltInTypeReifiers.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System;

namespace DarkConfig.Internal {
Expand Down
2 changes: 0 additions & 2 deletions src/DarkConfig/Internal/ChecksumUtils.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System.IO;

namespace DarkConfig.Internal {
Expand Down
2 changes: 0 additions & 2 deletions src/DarkConfig/Internal/ConfigFileManager.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System;
using System.Collections;
using System.Collections.Generic;
Expand Down
2 changes: 0 additions & 2 deletions src/DarkConfig/Internal/DocumentationGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
Expand Down
2 changes: 0 additions & 2 deletions src/DarkConfig/Internal/MultiCaseDictionary.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System;
using System.Collections;
using System.Collections.Generic;
Expand Down
2 changes: 0 additions & 2 deletions src/DarkConfig/Internal/ReflectionCache.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System;
using System.Collections.Generic;
using System.Reflection;
Expand Down
2 changes: 0 additions & 2 deletions src/DarkConfig/Internal/RegexUtils.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System.Collections.Generic;
using System.Text.RegularExpressions;

Expand Down
2 changes: 0 additions & 2 deletions src/DarkConfig/Internal/StringExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

namespace DarkConfig.Internal {
static class StringExtensions {
/// Returns the lowercase version of the key if <c>ignoreCase</c>, otherwise return the key itself
Expand Down
2 changes: 0 additions & 2 deletions src/DarkConfig/Internal/TypeReifier.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
2 changes: 0 additions & 2 deletions src/DarkConfig/Settings.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#nullable enable

using System;

namespace DarkConfig {
Expand Down

0 comments on commit 2f1a90c

Please sign in to comment.