jazzy icon indicating copy to clipboard operation
jazzy copied to clipboard

Extensions to Core Data managed classes in Xcode 8/Swift3/iOS10 are skipped if "--skip-undocumented" is used

Open esopher opened this issue 9 years ago • 3 comments

When using Core Data in Xcode 8/Swift 3/iOS 10, the class files for entities no longer need to be generated, but when extending an entity class (NSManagedObject), (and documenting it), Jazzy skips the extension if "--skip-undocumented" is used. Presumably this is because the parent class is not documented, and in fact doesn't exist, at least not in a .swift file in the project?

To reproduce this, create a new single-view application for iOS using Core Data, add an Entity named "Entity" to the model, and add an Entity.swift file to the project that extends the "Entity" class:

/// An extension to Entity.
extension Entity {
    /// A great function!
    func aGreatFunction() {
        print("It does nothing!")
    }
}

Run "jazzy --skip-undocumented" in the project directory and see that the extension documentation is not included.

This might be a separate issue, but I just realized that when not using "--skip-undocumented", the extension is documented but the documentation is added to the base entity class, which is still undocumented, and listed under Classes instead of Extensions.

esopher avatar Jan 12 '17 23:01 esopher

Fixed in #825.

jpsim avatar Jul 06 '17 17:07 jpsim

The first attempt at 825 did fix this particular case (extension + type in same module) -- the eventual one did not -- will get there eventually though.

johnfairh avatar Jul 06 '17 19:07 johnfairh

Ah, sorry for the misunderstanding

jpsim avatar Jul 06 '17 19:07 jpsim