Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static members of enums and structs not documented #66

Open
appfrilans opened this issue Jan 20, 2021 · 4 comments
Open

Static members of enums and structs not documented #66

appfrilans opened this issue Jan 20, 2021 · 4 comments
Labels

Comments

@appfrilans
Copy link

appfrilans commented Jan 20, 2021

Brief Description

SourceDocs does not seems to support "caseless enums" or static members of structs

Steps to Reproduce

Create a swift file with this content:

/**
 A description here 1
 */
public struct Constants {
    /**
     A description here 2
     */
    public static let myContant = "constant"
}

or

/**
 A description here 3
 */
public enum Constants {
    /**
     A description here 4
     */
    public static let myContant = "constant"
}
  1. Step 2
  2. Step 3

Expected Outcome

For the "A description here 2" to appear in the corresponding generated documentation.

Actual Outcome

The static constant is not mentionedin the documentation file for Constants

Environment

  • Operating System: macOS 11.1
  • Xcode Version: 12.3
  • SwiftDocs Version/SHA: SourceDocs v1.2.1
  • Swift version: 5.0

Additional Comments

Demo Project

@appfrilans
Copy link
Author

Seems to be an issue for classes as well. All static let is ignored

@eneko
Copy link
Collaborator

eneko commented Jan 21, 2021

Ah, good point, will have to look into this. Thanks for bringing this up.

@eneko eneko added the bug label Jan 21, 2021
@MathisDetourbet
Copy link
Contributor

MathisDetourbet commented Jan 25, 2021

Same for extension with static var.
I have an extension with only a static var inside. This file has been ignored for documentation. But if I add a method in this extension I will not be ignored.
The keyword static associated with var seems to be the problem. Works with static func

@eneko
Copy link
Collaborator

eneko commented Jan 25, 2021

Thanks for the follow up, that is useful.

MathisDetourbet pushed a commit to MathisDetourbet/SourceDocs that referenced this issue Feb 8, 2021
eneko pushed a commit that referenced this issue Feb 12, 2021
…67)

Co-authored-by: mathis-detourbet <mathis.detourbet@adevinta.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants