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

kysect / Configuin / 9090953468

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

push

github

FrediKats
Implement .editorconfig model serialization

196 of 298 branches covered (65.77%)

Branch coverage included in aggregate %.

74 of 82 new or added lines in 11 files covered. (90.24%)

1 existing line in 1 file now uncovered.

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

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

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

6
public record EditorConfigPropertyNode(EditorConfigStringNode Key, EditorConfigStringNode Value, ImmutableList<string> LeadingTrivia, string? TrailingTrivia) : IEditorConfigNode
7
{
8
    public EditorConfigPropertyNode(EditorConfigStringNode key, EditorConfigStringNode value) : this(key, value, ImmutableList<string>.Empty, null)
1,201✔
9
    {
10
    }
1,201✔
11

12
    public EditorConfigPropertyNode(string key, string value) : this(EditorConfigStringNode.Create(key), EditorConfigStringNode.Create(value))
8✔
13
    {
14
    }
8✔
15

16
    public string ToFullString()
17
    {
18
        var stringBuilder = new StringBuilder();
394✔
19
        LeadingTrivia.ForEach(s => stringBuilder.AppendLine(s));
558✔
20

21
        string line = $"{Key.ToFullString()}={Value.ToFullString()}";
394✔
22
        if (TrailingTrivia is not null)
394!
NEW
23
            line += $"{line} {TrailingTrivia}";
×
24

25
        stringBuilder.Append(line);
394✔
26
        return stringBuilder.ToString();
394✔
27
    }
28
}
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