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

kysect / Configuin / 9124192443

17 May 2024 06:53AM UTC coverage: 81.494% (+0.9%) from 80.585%
9124192443

push

github

FrediKats
Hack for fixing tests EOL formatting

239 of 358 branches covered (66.76%)

Branch coverage included in aggregate %.

0 of 7 new or added lines in 1 file covered. (0.0%)

4 existing lines in 3 files now uncovered.

1769 of 2106 relevant lines covered (84.0%)

531.82 hits per line

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

76.47
/Sources/Kysect.Configuin.EditorConfig/DocumentModel/Nodes/EditorConfigDocumentSectionNode.cs
1
using System.Collections.Immutable;
2
using System.Text;
3

4
namespace Kysect.Configuin.EditorConfig.DocumentModel.Nodes;
5

6
public record EditorConfigDocumentSectionNode(string Value, ImmutableList<IEditorConfigNode> Children, ImmutableList<string> LeadingTrivia, string? TrailingTrivia) : IEditorConfigContainerNode
7
{
8
    public const string NodeIndicator = "###";
9

10
    public EditorConfigDocumentSectionNode(string value) : this(value, ImmutableList<IEditorConfigNode>.Empty, ImmutableList<string>.Empty, null)
12✔
11
    {
12
    }
12✔
13

14
    IEditorConfigContainerNode IEditorConfigContainerNode.AddChild(IEditorConfigNode child)
15
    {
16
        return this with { Children = Children.Add(child) };
×
17
    }
18

19
    public IEditorConfigContainerNode WithChildren(ImmutableList<IEditorConfigNode> children)
20
    {
21
        return this with { Children = children };
1✔
22
    }
23

24
    public EditorConfigDocumentSectionNode AddChild(IEditorConfigNode child)
25
    {
26
        return this with { Children = Children.Add(child) };
18✔
27
    }
28

29
    public string ToFullString()
30
    {
31
        var stringBuilder = new StringBuilder();
4✔
32
        LeadingTrivia.ForEach(s => stringBuilder.AppendLine(s));
4✔
33

34
        string line = $"{Value}";
4!
35
        if (TrailingTrivia is not null)
4!
UNCOV
36
            line += $"{line} {TrailingTrivia}";
×
37
        stringBuilder.Append(line);
4✔
38

39
        Children.ForEach(c => stringBuilder.Append($"{Environment.NewLine}{c.ToFullString()}"));
12✔
40
        return stringBuilder.ToString();
4✔
41
    }
42
}
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