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

kysect / Configuin / 9090894826

15 May 2024 06:15AM UTC coverage: 80.585% (+1.7%) from 78.934%
9090894826

Pull #103

github

FrediKats
Implement .editorconfig model serialization
Pull Request #103: Add .editorconfig document model

196 of 298 branches covered (65.77%)

Branch coverage included in aggregate %.

239 of 252 new or added lines in 12 files covered. (94.84%)

1568 of 1891 relevant lines covered (82.92%)

591.59 hits per line

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

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

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

6
public record EditorConfigDocument(ImmutableList<IEditorConfigNode> Children, ImmutableList<string> TrailingTrivia) : IEditorConfigContainerNode
7
{
8
    public EditorConfigDocument(ImmutableList<IEditorConfigNode> children) : this(children, ImmutableList<string>.Empty)
23✔
9
    {
10
    }
23✔
11

12
    IEditorConfigContainerNode IEditorConfigContainerNode.AddChild(IEditorConfigNode child)
13
    {
NEW
14
        return AddChild(child);
×
15
    }
16

17
    public EditorConfigDocument AddChild(IEditorConfigNode child)
18
    {
19
        return this with { Children = Children.Add(child) };
18✔
20
    }
21

22
    public string ToFullString()
23
    {
24
        var stringBuilder = new StringBuilder();
2✔
25
        List<string> lines = new();
2✔
26
        lines.AddRange(Children.Select(c => c.ToFullString()));
5✔
27
        lines.AddRange(TrailingTrivia);
2✔
28

29
        stringBuilder.AppendJoin(Environment.NewLine, lines);
2✔
30
        return stringBuilder.ToString();
2✔
31
    }
32
}
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