Skip to content

Commit

Permalink
fix: Fix TryParseSingleName tabbing
Browse files Browse the repository at this point in the history
  • Loading branch information
skarllot committed Oct 6, 2024
1 parent dbb311e commit 2e5eabc
Show file tree
Hide file tree
Showing 59 changed files with 106 additions and 106 deletions.
6 changes: 3 additions & 3 deletions gen/EnumUtilities.Generators/CodeWriters/EnumFactoryWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ private void WriteTryParseLookup(
#line hidden

#line 148 "C:\Users\skarl\source\repos\github\skarllot\EnumUtilities\gen\EnumUtilities.Generators\CodeWriters\Factory\TryParseInternal.ttinclude"
this.Write(" result = ");
this.Write(" result = ");


#line default
Expand All @@ -756,7 +756,7 @@ private void WriteTryParseLookup(
#line hidden

#line 148 "C:\Users\skarl\source\repos\github\skarllot\EnumUtilities\gen\EnumUtilities.Generators\CodeWriters\Factory\TryParseInternal.ttinclude"
this.Write(";\r\n return true;\r\n");
this.Write(";\r\n return true;\r\n");


#line default
Expand All @@ -773,7 +773,7 @@ private void WriteTryParseLookup(
#line hidden

#line 155 "C:\Users\skarl\source\repos\github\skarllot\EnumUtilities\gen\EnumUtilities.Generators\CodeWriters\Factory\TryParseInternal.ttinclude"
this.Write(" result = 0;\r\n return false;\r\n");
this.Write(" result = 0;\r\n return false;\r\n");


#line default
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@
if (binEmptyValue != null)
{

Check warning on line 146 in gen/EnumUtilities.Generators/CodeWriters/Factory/TryParseInternal.ttinclude

View check run for this annotation

Codecov / codecov/patch

gen/EnumUtilities.Generators/CodeWriters/Factory/TryParseInternal.ttinclude#L146

Added line #L146 was not covered by tests
#>
result = <#= binEmptyValue.MemberValue #>;
return true;
result = <#= binEmptyValue.MemberValue #>;

Check warning on line 148 in gen/EnumUtilities.Generators/CodeWriters/Factory/TryParseInternal.ttinclude

View check run for this annotation

Codecov / codecov/patch

gen/EnumUtilities.Generators/CodeWriters/Factory/TryParseInternal.ttinclude#L148

Added line #L148 was not covered by tests
return true;
<#+
}

Check warning on line 151 in gen/EnumUtilities.Generators/CodeWriters/Factory/TryParseInternal.ttinclude

View check run for this annotation

Codecov / codecov/patch

gen/EnumUtilities.Generators/CodeWriters/Factory/TryParseInternal.ttinclude#L151

Added line #L151 was not covered by tests
else
{
#>
result = 0;
return false;
result = 0;
return false;
<#+
}
#>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
internal static partial class BigErrorCodeExtensions
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
internal static partial class BigErrorCodeFactory
{

Expand Down Expand Up @@ -193,8 +193,8 @@ private static bool TryParseSingleJsonString(ReadOnlySpan<char> value, StringCom
{
if (value.IsEmpty)
{
result = 0;
return false;
result = 0;
return false;
}

switch (value[0])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
internal sealed class BigErrorCodeJsonConverter : JsonConverter<BigErrorCode>
{
private const int MaxCharStack = 256;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
/// <summary>Provides metadata for <see cref="Categories" /> enumeration.</summary>
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
public static partial class CategoriesMetadata
{
/// <summary>Provides constant values for <see cref="Categories" /> members names.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
public static partial class CategoriesExtensions
{
/// <summary>Converts the value of this instance to its equivalent string representation.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
public static partial class CategoriesFactory
{
/// <summary>
Expand Down Expand Up @@ -221,8 +221,8 @@ private static bool TryParseSingleName(ReadOnlySpan<char> value, StringCompariso
{
if (value.IsEmpty)
{
result = 0;
return false;
result = 0;
return false;
}

switch (value[0])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
public static partial class CategoriesValidation
{
/// <summary>Returns a boolean telling whether the value of <see cref="Categories"/> instance exists in the enumeration.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
/// <summary>Provides metadata for <see cref="Colours" /> enumeration.</summary>
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
public static partial class ColoursMetadata
{
/// <summary>Provides constant values for <see cref="Colours" /> members names.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
public static partial class ColoursExtensions
{
/// <summary>Converts the value of this instance to its equivalent string representation.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
public static partial class ColoursFactory
{
/// <summary>
Expand Down Expand Up @@ -236,8 +236,8 @@ private static bool TryParseSingleName(ReadOnlySpan<char> value, StringCompariso
{
if (value.IsEmpty)
{
result = 0;
return false;
result = 0;
return false;
}

switch (value[0])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
public static partial class ColoursValidation
{
/// <summary>Returns a boolean telling whether the value of <see cref="Colours"/> instance exists in the enumeration.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
internal static partial class ErrorCodeExtensions
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
internal static partial class ErrorCodeFactory
{

Expand Down Expand Up @@ -193,8 +193,8 @@ private static bool TryParseSingleJsonString(ReadOnlySpan<char> value, StringCom
{
if (value.IsEmpty)
{
result = 0;
return false;
result = 0;
return false;
}

switch (value[0])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
internal sealed class ErrorCodeJsonConverter : JsonConverter<ErrorCode>
{
private const int MaxCharStack = 256;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
/// <summary>Provides metadata for <see cref="HumanStates" /> enumeration.</summary>
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
public static partial class HumanStatesMetadata
{
/// <summary>Provides constant values for <see cref="HumanStates" /> members names.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
public static partial class HumanStatesExtensions
{
/// <summary>Converts the value of this instance to its equivalent string representation.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
public static partial class HumanStatesFactory
{
/// <summary>
Expand Down Expand Up @@ -221,8 +221,8 @@ private static bool TryParseSingleName(ReadOnlySpan<char> value, StringCompariso
{
if (value.IsEmpty)
{
result = 0;
return false;
result = 0;
return false;
}

switch (value[0])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
public static partial class HumanStatesValidation
{
/// <summary>Returns a boolean telling whether the value of <see cref="HumanStates"/> instance exists in the enumeration.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
/// <summary>Provides metadata for <see cref="MyEnum1" /> enumeration.</summary>
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
internal static partial class MyEnum1Metadata
{
/// <summary>Provides constant values for <see cref="MyEnum1" /> members names.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
internal static partial class MyEnum1Extensions
{
/// <summary>Converts the value of this instance to its equivalent string representation.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
internal static partial class MyEnum1Factory
{
/// <summary>
Expand Down Expand Up @@ -221,8 +221,8 @@ private static bool TryParseSingleName(ReadOnlySpan<char> value, StringCompariso
{
if (value.IsEmpty)
{
result = 0;
return false;
result = 0;
return false;
}

switch (value[0])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
internal static partial class MyEnum1Validation
{
/// <summary>Returns a boolean telling whether the value of <see cref="MyEnum1"/> instance exists in the enumeration.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
/// <summary>Provides metadata for <see cref="MyEnum2" /> enumeration.</summary>
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
internal static partial class MyEnum2Metadata
{
/// <summary>Provides constant values for <see cref="MyEnum2" /> members names.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
internal static partial class MyEnum2Extensions
{
/// <summary>Converts the value of this instance to its equivalent string representation.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
internal static partial class MyEnum2Factory
{
/// <summary>
Expand Down Expand Up @@ -221,8 +221,8 @@ private static bool TryParseSingleName(ReadOnlySpan<char> value, StringCompariso
{
if (value.IsEmpty)
{
result = 0;
return false;
result = 0;
return false;
}

switch (value[0])
Expand Down Expand Up @@ -533,8 +533,8 @@ private static bool TryParseSingleEnumMemberValue(ReadOnlySpan<char> value, Stri
{
if (value.IsEmpty)
{
result = 0;
return false;
result = 0;
return false;
}

switch (value[0])
Expand Down Expand Up @@ -724,8 +724,8 @@ private static bool TryParseSingleDescription(ReadOnlySpan<char> value, StringCo
{
if (value.IsEmpty)
{
result = 0;
return false;
result = 0;
return false;
}

switch (value[0])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
internal static partial class MyEnum2Validation
{
/// <summary>Returns a boolean telling whether the value of <see cref="MyEnum2"/> instance exists in the enumeration.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
/// <summary>Provides metadata for <see cref="MyEnum3" /> enumeration.</summary>
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
public static partial class MyEnum3Metadata
{
/// <summary>Provides constant values for <see cref="MyEnum3" /> members names.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Raiqub.Generators.EnumUtilities.IntegrationTests.Models
{
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.8.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Raiqub.Generators.EnumUtilities", "1.9.0.0")]
public static partial class MyEnum3Extensions
{
/// <summary>Converts the value of this instance to its equivalent string representation.</summary>
Expand Down
Loading

0 comments on commit 2e5eabc

Please sign in to comment.