mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
Exclude some ToString() methods from coverage
These are only used for debug information and I'm okayish with them failing at runtime.
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
namespace CliFx.Domain
|
namespace CliFx.Domain
|
||||||
{
|
{
|
||||||
@@ -12,6 +13,7 @@ namespace CliFx.Domain
|
|||||||
|
|
||||||
public CommandDirectiveInput(string name) => Name = name;
|
public CommandDirectiveInput(string name) => Name = name;
|
||||||
|
|
||||||
|
[ExcludeFromCodeCoverage]
|
||||||
public override string ToString() => $"[{Name}]";
|
public override string ToString() => $"[{Name}]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using CliFx.Internal.Extensions;
|
using CliFx.Internal.Extensions;
|
||||||
@@ -36,6 +37,7 @@ namespace CliFx.Domain
|
|||||||
Options = options;
|
Options = options;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ExcludeFromCodeCoverage]
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
var buffer = new StringBuilder();
|
var buffer = new StringBuilder();
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using CliFx.Internal.Extensions;
|
using CliFx.Internal.Extensions;
|
||||||
|
|
||||||
@@ -29,6 +30,7 @@ namespace CliFx.Domain
|
|||||||
|
|
||||||
public string GetRawValues() => Values.Select(v => v.Quote()).JoinToString(" ");
|
public string GetRawValues() => Values.Select(v => v.Quote()).JoinToString(" ");
|
||||||
|
|
||||||
|
[ExcludeFromCodeCoverage]
|
||||||
public override string ToString() => $"{GetRawAlias()} {GetRawValues()}";
|
public override string ToString() => $"{GetRawAlias()} {GetRawValues()}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -75,6 +76,7 @@ namespace CliFx.Domain
|
|||||||
|
|
||||||
public string GetInternalDisplayString() => $"{Property?.Name ?? "<implicit>"} ('{GetUserFacingDisplayString()}')";
|
public string GetInternalDisplayString() => $"{Property?.Name ?? "<implicit>"} ('{GetUserFacingDisplayString()}')";
|
||||||
|
|
||||||
|
[ExcludeFromCodeCoverage]
|
||||||
public override string ToString() => GetInternalDisplayString();
|
public override string ToString() => GetInternalDisplayString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
namespace CliFx.Domain
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
|
||||||
|
namespace CliFx.Domain
|
||||||
{
|
{
|
||||||
internal class CommandParameterInput
|
internal class CommandParameterInput
|
||||||
{
|
{
|
||||||
@@ -6,6 +8,7 @@
|
|||||||
|
|
||||||
public CommandParameterInput(string value) => Value = value;
|
public CommandParameterInput(string value) => Value = value;
|
||||||
|
|
||||||
|
[ExcludeFromCodeCoverage]
|
||||||
public override string ToString() => Value;
|
public override string ToString() => Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Reflection;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using CliFx.Attributes;
|
using CliFx.Attributes;
|
||||||
|
|
||||||
@@ -31,6 +32,7 @@ namespace CliFx.Domain
|
|||||||
|
|
||||||
public string GetInternalDisplayString() => $"{Property?.Name ?? "<implicit>"} ([{Order}] {GetUserFacingDisplayString()})";
|
public string GetInternalDisplayString() => $"{Property?.Name ?? "<implicit>"} ([{Order}] {GetUserFacingDisplayString()})";
|
||||||
|
|
||||||
|
[ExcludeFromCodeCoverage]
|
||||||
public override string ToString() => GetInternalDisplayString();
|
public override string ToString() => GetInternalDisplayString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
@@ -207,6 +208,7 @@ namespace CliFx.Domain
|
|||||||
return buffer.ToString();
|
return buffer.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ExcludeFromCodeCoverage]
|
||||||
public override string ToString() => GetInternalDisplayString();
|
public override string ToString() => GetInternalDisplayString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user