Missing Docs

Declarations should be documented.

  • Identifier: missing_docs
  • Enabled by default: No
  • Supports autocorrection: No
  • Kind: lint
  • Analyzer rule: No
  • Minimum Swift compiler version: 5.0.0
  • Default configuration:
    KeyValue
    warning [open, public]
    excludes_extensions true
    excludes_inherited_types true
    excludes_trivial_init false

Non Triggering Examples

/// docs
public class A {
/// docs
public func b() {}
}
// no docs
public class B: A { override public func b() {} }
import Foundation
// no docs
public class B: NSObject {
// no docs
override public var description: String { fatalError() } }
/// docs
public class A {
    deinit {}
}
public extension A {}
/// docs
public class A {
    public init() {}
}

Triggering Examples

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
}
/// docs
public class A {
    public init(argument: String) {}
}