warnings as errors

This commit is contained in:
Adam Hathcock
2024-05-18 09:33:36 +01:00
parent b4188aae62
commit 6309adfde6
4 changed files with 12 additions and 9 deletions
@@ -166,21 +166,21 @@ internal class AccessorsTestsService : IAccessorsTestsService
set { }
}
public string PublicProperty { get; set; }
public string PublicProperty { get; set; } = string.Empty;
public string InitOnlyProperty { get; init; }
public string InitOnlyProperty { get; init; } = string.Empty;
public string PropertyWithPrivateSetter { get; private set; }
public string PropertyWithPrivateSetter { get; private set; } = string.Empty;
public string PropertyWithPrivateGetter { private get; set; }
public string PropertyWithPrivateGetter { private get; set; } = string.Empty;
public string PropertyWithProtectedSetter { get; protected set; }
public string PropertyWithProtectedSetter { get; protected set; } = string.Empty;
public string PropertyWithProtectedGetter { protected get; set; }
public string PropertyWithProtectedGetter { protected get; set; } = string.Empty;
[AutoInterfaceIgnore]
public string IgnoredProperty { get; set; }
public string IgnoredProperty { get; set; } = string.Empty;
public static string StaticProperty { get; set; }
public static string StaticProperty { get; set; } = string.Empty;
}
// ReSharper enable UnusedMember.Local, ValueParameterNotUsed
@@ -331,7 +331,7 @@ internal class MethodsTestService : IMethodsTestService
public void VoidMethodWithOutParam(out string a)
{
a = default;
a = string.Empty;
}
public void VoidMethodWithRefParam(ref string a) { }
@@ -4,6 +4,8 @@
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<RootNamespace>Speckle.InterfaceGenerator.Tests</RootNamespace>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
@@ -11,6 +11,7 @@
<NoPackageAnalysis>true</NoPackageAnalysis>
<RootNamespace>Speckle.InterfaceGenerator</RootNamespace>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>