Skip to content

Commit 5cd1888

Browse files
committed
Warning location fix
1 parent 1592cf6 commit 5cd1888

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/SwiftDocCoverage/Coverage.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public struct Coverage {
8787
return
8888
}
8989

90-
let undocumented = source.undocumented.map { DeclarationReport(line: $0.line, column: $0.line, name: $0.name) }
90+
let undocumented = source.undocumented.map { DeclarationReport(line: $0.line, column: $0.column, name: $0.name) }
9191
let sourceReport = SourceReport(path: url.path,
9292
totalCount: source.declarations.count,
9393
undocumented: undocumented)
@@ -126,7 +126,7 @@ public struct Coverage {
126126
public func reportWarnings() throws {
127127
try report { source in
128128
source.undocumented.forEach {
129-
output.write("\(source.path):\($0.line):\($0.column): warning: No documentation.")
129+
output.write("\(source.path):\($0.line):\($0.column): warning: No documentation for '\($0.name)'.")
130130
}
131131
}
132132
}

Tests/SwiftDocCoverageTests/SwiftDocCoverageTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ final class ToolTests: XCTestCase {
483483
let process = Process()
484484
let output = try process.run(swiftDocCoverageURL, arguments: [fileURL.path, "--report", "warnings"])
485485
XCTAssert(process.terminationStatus == EXIT_SUCCESS)
486-
XCTAssert(output.contains("warning: No documentation."))
486+
XCTAssert(output.contains("warning: No documentation for 'Rect.size'."))
487487
}
488488

489489
func test_json() throws {

0 commit comments

Comments
 (0)