diff --git a/.editorconfig b/.editorconfig
index 24eda6c4..655a6ab3 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -115,79 +115,22 @@ csharp_space_between_method_call_empty_parameter_list_parentheses = false
# Wrapping preferences
csharp_preserve_single_line_statements = true
csharp_preserve_single_line_blocks = true
+
###############################
# C# Async Rules #
###############################
# CS4014: Task not awaited
dotnet_diagnostic.CS4014.severity = error
+
# CS1998: Async function does not contain await
dotnet_diagnostic.CS1998.severity = silent
###############################
-# C# Nullability #
+# Other #
###############################
-# CS8602: Dereference of a possibly null reference.
-dotnet_diagnostic.CS8602.severity = error
-# CS8600: Converting null literal or possible null value to non-nullable type.
-dotnet_diagnostic.CS8600.severity = error
+# CS1591: Missing XML comment for publicly visible type or member
+dotnet_diagnostic.CS1591.severity = silent
-# CS8619: Nullability of reference types in value doesn't match target type.
-dotnet_diagnostic.CS8619.severity = error
-
-# CS8603: Possible null reference return.
-dotnet_diagnostic.CS8603.severity = error
-
-# CS8625: Cannot convert null literal to non-nullable reference type.
-dotnet_diagnostic.CS8625.severity = error
-
-# CS8653: A default expression introduces a null value for a type parameter.
-dotnet_diagnostic.CS8653.severity = silent
-
-# CS8601: Possible null reference assignment.
-dotnet_diagnostic.CS8601.severity = error
-
-# CS8604: Possible null reference argument.
-dotnet_diagnostic.CS8604.severity = error
-
-# CS8622: Nullability of reference types in type of parameter doesn't match the target delegate.
-dotnet_diagnostic.CS8622.severity = error
-
-# CS8610: Nullability of reference types in type of parameter doesn't match overridden member.
-dotnet_diagnostic.CS8610.severity = error
-
-# CS8618: Non-nullable field is uninitialized. Consider declaring as nullable.
-dotnet_diagnostic.CS8618.severity = error
-
-# CS8629: Nullable value type may be null.
-dotnet_diagnostic.CS8629.severity = error
-
-# CS8620: Argument cannot be used for parameter due to differences in the nullability of reference types.
-dotnet_diagnostic.CS8620.severity = error
-
-# CS8614: Nullability of reference types in type of parameter doesn't match implicitly implemented member.
-dotnet_diagnostic.CS8614.severity = error
-
-# CS8617: Nullability of reference types in type of parameter doesn't match implemented member.
-dotnet_diagnostic.CS8617.severity = error
-
-# CS8611: Nullability of reference types in type of parameter doesn't match partial method declaration.
-dotnet_diagnostic.CS8611.severity = error
-
-# CS8597: Thrown value may be null.
-dotnet_diagnostic.CS8597.severity = error
-
-# CS8609: Nullability of reference types in return type doesn't match overridden member.
-dotnet_diagnostic.CS8609.severity = error
-
-# CS8714: The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match 'notnull' constraint.
-dotnet_diagnostic.CS8714.severity = error
-
-# CS8605: Unboxing a possibly null value.
-dotnet_diagnostic.CS8605.severity = error
-
-# CS8613: Nullability of reference types in return type doesn't match implicitly implemented member.
-dotnet_diagnostic.CS8613.severity = error
-
-# CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
-dotnet_diagnostic.CS8632.severity = error
\ No newline at end of file
+dotnet_diagnostic.CS1701.severity = silent
+dotnet_diagnostic.CS1702.severity = silent
diff --git a/Compression.BSA/Compression.BSA.csproj b/Compression.BSA/Compression.BSA.csproj
index a4af6858..04f16b32 100644
--- a/Compression.BSA/Compression.BSA.csproj
+++ b/Compression.BSA/Compression.BSA.csproj
@@ -5,6 +5,8 @@
true
x64
win10-x64
+ 1.1
+ true
Compression.BSA.xml
diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 00000000..0aa2a398
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,5 @@
+
+
+ nullable
+
+
diff --git a/Wabbajack.Common/Json.cs b/Wabbajack.Common/Json.cs
index c2ef7882..78c6b611 100644
--- a/Wabbajack.Common/Json.cs
+++ b/Wabbajack.Common/Json.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Reflection;
@@ -244,14 +245,12 @@ namespace Wabbajack.Common
public class IPathConverter : JsonConverter
{
- public override void WriteJson(JsonWriter writer, IPath value, JsonSerializer serializer)
+ public override void WriteJson(JsonWriter writer, [AllowNull] IPath value, JsonSerializer serializer)
{
writer.WriteValue(Enum.GetName(typeof(Game), value));
}
- public override IPath ReadJson(JsonReader reader, Type objectType, IPath existingValue,
- bool hasExistingValue,
- JsonSerializer serializer)
+ public override IPath ReadJson(JsonReader reader, Type objectType, [AllowNull] IPath existingValue, bool hasExistingValue, JsonSerializer serializer)
{
// Backwards compatibility support
var str = reader.Value?.ToString();
@@ -260,7 +259,6 @@ namespace Wabbajack.Common
if (Path.IsPathRooted(str))
return (AbsolutePath)str;
return (RelativePath)str;
-
}
}
diff --git a/Wabbajack.Common/Wabbajack.Common.csproj b/Wabbajack.Common/Wabbajack.Common.csproj
index 48d1cadc..6e2d6221 100644
--- a/Wabbajack.Common/Wabbajack.Common.csproj
+++ b/Wabbajack.Common/Wabbajack.Common.csproj
@@ -14,9 +14,11 @@
https://raw.githubusercontent.com/wabbajack-tools/wabbajack/master/LICENSE.txt
https://www.wabbajack.org/favicon.ico
https://github.com/wabbajack-tools/wabbajack
+ 1.1
Wabbajack.Common.xml
+