Skip to content

Latest commit

 

History

History
55 lines (37 loc) · 747 Bytes

missing_docs.md

File metadata and controls

55 lines (37 loc) · 747 Bytes

Pattern: Undocumented declaration

Issue: -

Description

Declarations should be documented.

Examples of correct code:

/// docs
public class A {
/// docs
public func b() {}
}
/// docs
public class B: A { override public func b() {} }


import Foundation
/// docs
public class B: NSObject {
// no docs
override public var description: String { fatalError() } }

Examples of incorrect code:

public func a() {}


// regular comment
public func a() {}


/* regular comment */
public func a() {}


/// docs
public protocol A {
// no docs
var b: Int { get } }
/// docs
public struct C: A {

public let b: Int
}

Further Reading