• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kysect / Configuin / 9148112992

19 May 2024 01:43PM UTC coverage: 84.596% (-0.6%) from 85.178%
9148112992

push

github

FrediKats
Replace .editorconfig with DotnetConfig

324 of 432 branches covered (75.0%)

Branch coverage included in aggregate %.

314 of 347 new or added lines in 28 files covered. (90.49%)

2 existing lines in 1 file now uncovered.

1977 of 2288 relevant lines covered (86.41%)

1201.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.0
/Sources/Kysect.Configuin.DotnetConfig/Syntax/Nodes/DotnetConfigRuleCompositeOptionNode.cs
1
using System.Collections.Immutable;
2
using System.Text;
3

4
namespace Kysect.Configuin.DotnetConfig.Syntax.Nodes;
5

6
public record DotnetConfigRuleCompositeOptionNode(
7
    IReadOnlyCollection<string> KeyParts,
8
    EqualSymbolSyntaxNode EqualSymbol,
9
    string Value,
10
    ImmutableList<string> LeadingTrivia,
11
    string? TrailingTrivia
12
    ) : IDotnetConfigPropertySyntaxNode
13
{
NEW
14
    string IDotnetConfigPropertySyntaxNode.Key => string.Join('.', KeyParts);
×
15

16
    public DotnetConfigRuleCompositeOptionNode(IReadOnlyCollection<string> keyParts, EqualSymbolSyntaxNode equalSymbol, string value) : this(keyParts, equalSymbol, value, [], null)
63✔
17
    {
18
    }
63✔
19

20
    public DotnetConfigRuleCompositeOptionNode(IReadOnlyCollection<string> keyParts, string value) : this(keyParts, EqualSymbolSyntaxNode.Empty, value, [], null)
1✔
21
    {
22
    }
1✔
23

24
    public IDotnetConfigPropertySyntaxNode WithLeadingTrivia(ImmutableList<string> leadingTrivia)
25
    {
26
        return this with { LeadingTrivia = leadingTrivia };
63✔
27
    }
28

29
    public IDotnetConfigPropertySyntaxNode WithTrailingTrivia(string? trailingTrivia)
30
    {
31
        return this with { TrailingTrivia = trailingTrivia };
×
32
    }
33

34
    public string ToFullString()
35
    {
36
        // TODO: reduce duplication
37
        var fullString = $"{string.Join('.', KeyParts)}{EqualSymbol.ToFullString()}{Value}";
66✔
38
        var stringBuilder = new StringBuilder();
66✔
39
        LeadingTrivia.ForEach(s => stringBuilder.AppendLine(s));
88✔
40

41
        if (TrailingTrivia is not null)
66!
42
            fullString += $"#{TrailingTrivia}";
×
43

44
        stringBuilder.Append(fullString);
66✔
45
        return stringBuilder.ToString();
66✔
46
    }
47
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc