• 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

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

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

6
public record DotnetConfigDocument(ImmutableList<IDotnetConfigSyntaxNode> Children, ImmutableList<string> TrailingTrivia) : IDotnetConfigContainerSyntaxNode
7
{
8
    public DotnetConfigDocument() : this([])
16✔
9
    {
10
    }
16✔
11

12
    public DotnetConfigDocument(ImmutableList<IDotnetConfigSyntaxNode> children) : this(children, ImmutableList<string>.Empty)
41✔
13
    {
14
    }
41✔
15

16
    IDotnetConfigContainerSyntaxNode IDotnetConfigContainerSyntaxNode.AddChild(IDotnetConfigSyntaxNode child)
17
    {
NEW
18
        return AddChild(child);
×
19
    }
20

21
    public IDotnetConfigContainerSyntaxNode WithChildren(ImmutableList<IDotnetConfigSyntaxNode> children)
22
    {
23
        return this with { Children = children };
8✔
24
    }
25

26
    public DotnetConfigDocument AddChild(IDotnetConfigSyntaxNode child)
27
    {
28
        return this with { Children = Children.Add(child) };
60✔
29
    }
30

31
    public string ToFullString()
32
    {
33
        var stringBuilder = new StringBuilder();
6✔
34
        List<string> lines = new();
6✔
35
        lines.AddRange(Children.Select(c => c.ToFullString()));
17✔
36
        lines.AddRange(TrailingTrivia);
6✔
37

38
        stringBuilder.AppendJoin(Environment.NewLine, lines);
6✔
39
        return stringBuilder.ToString();
6✔
40
    }
41
}
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