Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

static properties don’t show static in their declarations #217

Closed
@prachigauriar

Description

@prachigauriar

I noticed that in swift-doc 1.0.0-beta.5, static properties don’t show the keyword static in their declaration. This can be confusing when reading the documentation, as it they look like normal instance properties.

Example Input:

public struct MyThing {
    public static let staticProperty: String = ""
    public let instanceProperty: Int


    public init(instanceProperty: Int) {
        self.instanceProperty = instanceProperty
    }
}

Command-line:

swift-doc generate --module-name SwiftDocExample -o Docs

Output:

MyThing

public struct MyThing

Initializers

init(instanceProperty:)

public init(instanceProperty: Int)

Properties

staticProperty

let staticProperty: String = ""

instanceProperty

let instanceProperty: Int

Please consider fixing this bug for the next beta. Differentiating between static and instance properties is pretty important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions