3
3
using System . IO ;
4
4
using System . Linq ;
5
5
6
+ using Coverlet . Core . Enums ;
6
7
using Coverlet . Core . Helpers ;
7
8
using Coverlet . Core . Instrumentation ;
8
9
using Coverlet . Core . Symbols ;
@@ -48,7 +49,7 @@ public Coverage(string module, string[] includeFilters, string[] includeDirector
48
49
public void PrepareModules ( )
49
50
{
50
51
string [ ] modules = InstrumentationHelper . GetCoverableModules ( _module , _includeDirectories ) ;
51
- string [ ] excludes = InstrumentationHelper . GetExcludedFiles ( _excludedSourceFiles ) ;
52
+ string [ ] excludes = InstrumentationHelper . GetExcludedFiles ( _excludedSourceFiles ) ;
52
53
_excludeFilters = _excludeFilters ? . Where ( f => InstrumentationHelper . IsValidFilterExpression ( f ) ) . ToArray ( ) ;
53
54
_includeFilters = _includeFilters ? . Where ( f => InstrumentationHelper . IsValidFilterExpression ( f ) ) . ToArray ( ) ;
54
55
@@ -131,14 +132,14 @@ public CoverageResult GetCoverageResult()
131
132
if ( methods . TryGetValue ( branch . Method , out Method method ) )
132
133
{
133
134
method . Branches . Add ( new BranchInfo
134
- { Line = branch . Number , Hits = branch . Hits , Offset = branch . Offset , EndOffset = branch . EndOffset , Path = branch . Path , Ordinal = branch . Ordinal }
135
+ { Line = branch . Number , Hits = branch . Hits , Offset = branch . Offset , EndOffset = branch . EndOffset , Path = branch . Path , Ordinal = branch . Ordinal }
135
136
) ;
136
137
}
137
138
else
138
139
{
139
140
documents [ doc . Path ] [ branch . Class ] . Add ( branch . Method , new Method ( ) ) ;
140
141
documents [ doc . Path ] [ branch . Class ] [ branch . Method ] . Branches . Add ( new BranchInfo
141
- { Line = branch . Number , Hits = branch . Hits , Offset = branch . Offset , EndOffset = branch . EndOffset , Path = branch . Path , Ordinal = branch . Ordinal }
142
+ { Line = branch . Number , Hits = branch . Hits , Offset = branch . Offset , EndOffset = branch . EndOffset , Path = branch . Path , Ordinal = branch . Ordinal }
142
143
) ;
143
144
}
144
145
}
@@ -147,7 +148,7 @@ public CoverageResult GetCoverageResult()
147
148
documents [ doc . Path ] . Add ( branch . Class , new Methods ( ) ) ;
148
149
documents [ doc . Path ] [ branch . Class ] . Add ( branch . Method , new Method ( ) ) ;
149
150
documents [ doc . Path ] [ branch . Class ] [ branch . Method ] . Branches . Add ( new BranchInfo
150
- { Line = branch . Number , Hits = branch . Hits , Offset = branch . Offset , EndOffset = branch . EndOffset , Path = branch . Path , Ordinal = branch . Ordinal }
151
+ { Line = branch . Number , Hits = branch . Hits , Offset = branch . Offset , EndOffset = branch . EndOffset , Path = branch . Path , Ordinal = branch . Ordinal }
151
152
) ;
152
153
}
153
154
}
@@ -157,7 +158,7 @@ public CoverageResult GetCoverageResult()
157
158
documents [ doc . Path ] . Add ( branch . Class , new Methods ( ) ) ;
158
159
documents [ doc . Path ] [ branch . Class ] . Add ( branch . Method , new Method ( ) ) ;
159
160
documents [ doc . Path ] [ branch . Class ] [ branch . Method ] . Branches . Add ( new BranchInfo
160
- { Line = branch . Number , Hits = branch . Hits , Offset = branch . Offset , EndOffset = branch . EndOffset , Path = branch . Path , Ordinal = branch . Ordinal }
161
+ { Line = branch . Number , Hits = branch . Hits , Offset = branch . Offset , EndOffset = branch . EndOffset , Path = branch . Path , Ordinal = branch . Ordinal }
161
162
) ;
162
163
}
163
164
}
@@ -292,7 +293,7 @@ private string GetSourceLinkUrl(Dictionary<string, string> sourceLinkDocuments,
292
293
}
293
294
294
295
relativePathOfBestMatch = relativePathOfBestMatch == "." ? string . Empty : relativePathOfBestMatch ;
295
-
296
+
296
297
string replacement = Path . Combine ( relativePathOfBestMatch , Path . GetFileName ( document ) ) ;
297
298
replacement = replacement . Replace ( '\\ ' , '/' ) ;
298
299
0 commit comments