@@ -128,12 +128,11 @@ struct SwiftDocCoverage: ParsableCommand {
128
128
let declarations = source. declarations ( accessLevel: minimumAccessLevel. accessLevel)
129
129
if declarations. count > 0 {
130
130
index += 1
131
- let filePath = url. absoluteString
132
131
if report == . coverage {
133
- Self . coverage ( index: index, time: sourceTime, filePath : filePath , declarations: declarations, out: out)
132
+ Self . coverage ( index: index, time: sourceTime, path : url . path , declarations: declarations, out: out)
134
133
}
135
134
else if report == . warnings {
136
- Self . warnings ( filePath : filePath , declarations: declarations, out: out)
135
+ Self . warnings ( path : url . path , declarations: declarations, out: out)
137
136
}
138
137
}
139
138
}
@@ -243,7 +242,7 @@ struct SwiftDocCoverage: ParsableCommand {
243
242
return time
244
243
}
245
244
246
- static func coverage( index: Int , time: Date , filePath : String , declarations: [ SwiftDeclaration ] , out: Output ? ) {
245
+ static func coverage( index: Int , time: Date , path : String , declarations: [ SwiftDeclaration ] , out: Output ? ) {
247
246
assert ( declarations. count > 0 )
248
247
249
248
let undocumented = declarations. filter { $0. hasDoc == false }
@@ -252,10 +251,10 @@ struct SwiftDocCoverage: ParsableCommand {
252
251
let documentedCount = totalCount - undocumented. count
253
252
let coverage = documentedCount * 100 / totalCount
254
253
255
- out? . write ( " \( index) ) \( filePath ) : \( coverage) % [ \( documentedCount) / \( totalCount) ] ( \( string ( from: - time. timeIntervalSinceNow) ) ) " )
254
+ out? . write ( " \( index) ) \( path ) : \( coverage) % [ \( documentedCount) / \( totalCount) ] ( \( string ( from: - time. timeIntervalSinceNow) ) ) " )
256
255
257
256
if undocumented. count > 0 {
258
- let fileName = NSString ( string: filePath ) . lastPathComponent
257
+ let fileName = NSString ( string: path ) . lastPathComponent
259
258
260
259
out? . write ( " Undocumented: " )
261
260
undocumented. forEach {
@@ -265,13 +264,13 @@ struct SwiftDocCoverage: ParsableCommand {
265
264
}
266
265
}
267
266
268
- static func warnings( filePath : String , declarations: [ SwiftDeclaration ] , out: Output ? ) {
267
+ static func warnings( path : String , declarations: [ SwiftDeclaration ] , out: Output ? ) {
269
268
assert ( declarations. count > 0 )
270
269
271
270
declarations
272
271
. filter { $0. hasDoc == false }
273
272
. forEach {
274
- out? . write ( " \( filePath ) : \( $0. line) : \( $0. column) : warning: No documentation for ' \( $0. name) '. " )
273
+ out? . write ( " \( path ) : \( $0. line) : \( $0. column) : warning: No documentation for ' \( $0. name) '. " )
275
274
}
276
275
}
277
276
}
0 commit comments