@@ -125,21 +125,18 @@ public override void CreateClassReport(Class @class, IEnumerable<FileAnalysis> f
125
125
{
126
126
var fileElement = new XElement ( "File" , new XAttribute ( "name" , fileAnalysis . Path ) ) ;
127
127
128
- if ( string . IsNullOrEmpty ( fileAnalysis . Error ) )
128
+ foreach ( var line in fileAnalysis . Lines )
129
129
{
130
- foreach ( var line in fileAnalysis . Lines )
131
- {
132
- var lineElement = new XElement ( "LineAnalysis" ) ;
130
+ var lineElement = new XElement ( "LineAnalysis" ) ;
133
131
134
- lineElement . Add ( new XAttribute ( "line" , line . LineNumber . ToString ( CultureInfo . InvariantCulture ) ) ) ;
135
- lineElement . Add ( new XAttribute ( "visits" , line . LineVisits . ToString ( CultureInfo . InvariantCulture ) ) ) ;
136
- lineElement . Add ( new XAttribute ( "coverage" , line . LineVisitStatus . ToString ( ) ) ) ;
137
- lineElement . Add ( new XAttribute ( "coveredbranches" , line . CoveredBranches . HasValue ? line . CoveredBranches . Value . ToString ( CultureInfo . InvariantCulture ) : string . Empty ) ) ;
138
- lineElement . Add ( new XAttribute ( "totalbranches" , line . TotalBranches . HasValue ? line . TotalBranches . Value . ToString ( CultureInfo . InvariantCulture ) : string . Empty ) ) ;
139
- lineElement . Add ( new XAttribute ( "content" , StringHelper . ReplaceInvalidXmlChars ( line . LineContent ) ) ) ;
132
+ lineElement . Add ( new XAttribute ( "line" , line . LineNumber . ToString ( CultureInfo . InvariantCulture ) ) ) ;
133
+ lineElement . Add ( new XAttribute ( "visits" , line . LineVisits . ToString ( CultureInfo . InvariantCulture ) ) ) ;
134
+ lineElement . Add ( new XAttribute ( "coverage" , line . LineVisitStatus . ToString ( ) ) ) ;
135
+ lineElement . Add ( new XAttribute ( "coveredbranches" , line . CoveredBranches . HasValue ? line . CoveredBranches . Value . ToString ( CultureInfo . InvariantCulture ) : string . Empty ) ) ;
136
+ lineElement . Add ( new XAttribute ( "totalbranches" , line . TotalBranches . HasValue ? line . TotalBranches . Value . ToString ( CultureInfo . InvariantCulture ) : string . Empty ) ) ;
137
+ lineElement . Add ( new XAttribute ( "content" , StringHelper . ReplaceInvalidXmlChars ( line . LineContent ) ) ) ;
140
138
141
- fileElement . Add ( lineElement ) ;
142
- }
139
+ fileElement . Add ( lineElement ) ;
143
140
}
144
141
145
142
filesElement . Add ( fileElement ) ;
0 commit comments