SourceKitten skipping class when generating documentation
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 2.4k
- Forks
- 237
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to document a project using SourceKitten.The project only contains a Swift file with a class that inherits from NSObject. With the terminal command:
sourcekitten doc -- -workspace ExampleApp.xcworkspace -scheme ExampleService > swiftDoc-example.json
I get the output:
Running xcodebuild
Checking xcodebuild -showBuildSettings
Assuming New Build System is used
and an empty JSON file. I don't know what the problem is because the class is public and the project can be built with Xcode. The class imports some frameworks, which I was able to document successfully. I have created an example class to see if it's at least documented. I also tried /// and /** */ for the class documentation. Unfortunately without success.
I'm desperate and I don't know what to do anymore.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the sourcekitten doc command against ExampleApp.xcworkspace with the ExampleService scheme and inspect why the generated swiftDoc-example.json is empty. Compare the result with the successfully documented imported frameworks; done means the public NSObject-derived class appears in the generated documentation output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- documentation, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100