-
Notifications
You must be signed in to change notification settings - Fork 396
Expand file tree
/
Copy pathCoverletSettings.cs
More file actions
117 lines (97 loc) · 3.73 KB
/
Copy pathCoverletSettings.cs
File metadata and controls
117 lines (97 loc) · 3.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
// Copyright (c) Toni Solarin-Sodara
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Linq;
using System.Text;
namespace Coverlet.Collector.DataCollection
{
/// <summary>
/// Coverlet settings
/// </summary>
internal class CoverletSettings
{
/// <summary>
/// Test module
/// </summary>
public string TestModule { get; set; }
/// <summary>
/// Report formats
/// </summary>
public string[] ReportFormats { get; set; }
/// <summary>
/// Filters to include
/// </summary>
public string[] IncludeFilters { get; set; }
/// <summary>
/// Directories to include
/// </summary>
public string[] IncludeDirectories { get; set; }
/// <summary>
/// Filters to exclude
/// </summary>
public string[] ExcludeFilters { get; set; }
/// <summary>
/// Source files to exclude
/// </summary>
public string[] ExcludeSourceFiles { get; set; }
/// <summary>
/// Attributes to exclude
/// </summary>
public string[] ExcludeAttributes { get; set; }
/// <summary>
/// Coverate report path to merge with
/// </summary>
public string MergeWith { get; set; }
/// <summary>
/// Use source link flag
/// </summary>
public bool UseSourceLink { get; set; }
/// <summary>
/// Single hit flag
/// </summary>
public bool SingleHit { get; set; }
/// <summary>
/// Includes test assembly
/// </summary>
public bool IncludeTestAssembly { get; set; }
/// <summary>
/// Neither track nor record auto-implemented properties.
/// </summary>
public bool SkipAutoProps { get; set; }
/// <summary>
/// Attributes that mark methods that never return.
/// </summary>
public string[] DoesNotReturnAttributes { get; set; }
/// <summary>
/// DeterministicReport flag
/// </summary>
public bool DeterministicReport { get; set; }
/// <summary>
/// Switch for heuristic to automatically exclude assemblies without source.
/// </summary>
public string ExcludeAssembliesWithoutSources { get; set; }
/// <summary>
/// Report merging flag
/// </summary>
public bool ReportMerging { get; set; }
public override string ToString()
{
var builder = new StringBuilder();
builder.AppendFormat("TestModule: '{0}', ", TestModule);
builder.AppendFormat("IncludeFilters: '{0}', ", string.Join(",", IncludeFilters ?? Enumerable.Empty<string>()));
builder.AppendFormat("IncludeDirectories: '{0}', ", string.Join(",", IncludeDirectories ?? Enumerable.Empty<string>()));
builder.AppendFormat("ExcludeFilters: '{0}', ", string.Join(",", ExcludeFilters ?? Enumerable.Empty<string>()));
builder.AppendFormat("ExcludeSourceFiles: '{0}', ", string.Join(",", ExcludeSourceFiles ?? Enumerable.Empty<string>()));
builder.AppendFormat("ExcludeAttributes: '{0}', ", string.Join(",", ExcludeAttributes ?? Enumerable.Empty<string>()));
builder.AppendFormat("MergeWith: '{0}', ", MergeWith);
builder.AppendFormat("UseSourceLink: '{0}'", UseSourceLink);
builder.AppendFormat("SingleHit: '{0}'", SingleHit);
builder.AppendFormat("IncludeTestAssembly: '{0}'", IncludeTestAssembly);
builder.AppendFormat("SkipAutoProps: '{0}'", SkipAutoProps);
builder.AppendFormat("DoesNotReturnAttributes: '{0}'", string.Join(",", DoesNotReturnAttributes ?? Enumerable.Empty<string>()));
builder.AppendFormat("DeterministicReport: '{0}'", DeterministicReport);
builder.AppendFormat("ExcludeAssembliesWithoutSources: '{0}'", ExcludeAssembliesWithoutSources);
builder.AppendFormat("ReportMerging: '{0}'", ReportMerging);
return builder.ToString();
}
}
}