mirror of
https://github.com/RPCS3/discord-bot.git
synced 2026-01-31 01:25:22 +01:00
set langversion to latest, and enable nullable types in all projects
This commit is contained in:
@@ -65,13 +65,13 @@ public class AttributeUsageAnalyzer : DiagnosticAnalyzer
|
||||
private static bool IsDescendantOfAttribute(AttributeData attributeData, string baseAttributeClassNameWithNamespace)
|
||||
{
|
||||
var attrClass = attributeData.AttributeClass;
|
||||
do
|
||||
while (attrClass is not null)
|
||||
{
|
||||
if (attrClass.ToDisplayString() == baseAttributeClassNameWithNamespace)
|
||||
return true;
|
||||
|
||||
attrClass = attrClass.BaseType;
|
||||
} while (attrClass != null);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<NoWarn>1701;1702;RS2008;RS1036</NoWarn>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -95,7 +95,7 @@ public class Win32ErrorsSourceGenerator : ISourceGenerator
|
||||
previousPos = (int)stream.Position;
|
||||
|
||||
var name = nameDescParts[0];
|
||||
var desc = nameDescParts[1].Replace("\\", "\\\\").Replace("\"", "\\\"");
|
||||
var desc = nameDescParts[1].Replace(@"\", @"\\").Replace("\"", "\\\"");
|
||||
result.AppendLine($"{Indent}{Indent}{Indent}[{errorCodeLine.Trim()}] = (\"{name.Trim()}\", \"{desc.Trim()}\"),");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user