Static members of enums and structs not documented
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"
}
- Step 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
Seems to be an issue for classes as well. All static let is ignored
Ah, good point, will have to look into this. Thanks for bringing this up.
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
Thanks for the follow up, that is useful.