Skip to content

Commit b11bbfe

Browse files
committed
Removed Coverage and Report
1 parent 726825a commit b11bbfe

File tree

8 files changed

+232
-335
lines changed

8 files changed

+232
-335
lines changed

Sources/SwiftSource/Coverage.swift

Lines changed: 0 additions & 201 deletions
This file was deleted.

Sources/SwiftSource/Report.swift

Lines changed: 0 additions & 62 deletions
This file was deleted.

Sources/SwiftSource/SwiftComment.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public struct SwiftComment {
3737
}
3838
}
3939

40-
public var hasDoc: Bool {
40+
public var isDoc: Bool {
4141
switch piece {
4242
case .docLineComment: fallthrough
4343
case .docBlockComment: return true

Sources/SwiftSource/SwiftDeclaration.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ public struct SwiftDeclaration {
4242
public let name: String
4343
public let line: Int
4444
public let column: Int
45+
46+
public var isDocumented: Bool {
47+
comments.first { $0.isDoc } != nil
48+
}
4549

4650
@StringBuilder
4751
private static func buildName(decl: DeclProtocol, path: String?) -> String {

Sources/SwiftSource/Visitor.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import SwiftParser
2828
class Visitor: SyntaxVisitor {
2929
private var context = [DeclProtocol]()
3030
private let converter: SourceLocationConverter
31-
3231
private(set) var declarations = [SwiftDeclaration]()
3332

3433
init(source: String) {

Sources/SwiftSource/Output.swift renamed to Sources/swift-doc-coverage/Output.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
import Foundation
2525

26-
public class Output {
26+
class Output {
2727
let stream: UnsafeMutablePointer<FILE>
2828

2929
init(stream: UnsafeMutablePointer<FILE>) {
@@ -36,16 +36,16 @@ public class Output {
3636
}
3737
}
3838

39-
public class TerminalOutput: Output {
39+
class TerminalOutput: Output {
4040

41-
public init() {
41+
init() {
4242
super.init(stream: Darwin.stdout)
4343
}
4444
}
4545

46-
public class FileOutput: Output {
46+
class FileOutput: Output {
4747

48-
public init(path: String) throws {
48+
init(path: String) throws {
4949
let dirPath = NSString(string: path).deletingLastPathComponent
5050
if FileManager.default.fileExists(atPath: dirPath) == false {
5151
try FileManager.default.createDirectory(atPath: dirPath, withIntermediateDirectories: true)

0 commit comments

Comments
 (0)