jazzy icon indicating copy to clipboard operation
jazzy copied to clipboard

Option to exclude Swift types

Open drekka opened this issue 8 years ago • 2 comments

Currently we can exclude source classes from the generated documentation using --exclude file.

But sometimes we have multiple sources in a single file, some of which we want to exclude and some we want to document. For example, we might have a public protocol and a private implementation.

I'd like to suggest adding a variation on --exclude that lets us specify the exclusion of a type rather than a source file. Something like:

---excludeType type1,ty*,*pe*

Notice the option to use wildcards to also allow us to exclude groups. For example we might want to do something like --excludeType *Impl.

drekka avatar Jul 17 '17 01:07 drekka

@drekka, the wildcards are an interesting new idea.

One does already have a lot of control over excluding symbols by marking them with /// :nodoc:. Also, --skip-undocumented and --min-acl directly deal with what I suspect are the most common usage cases. Are any of those helpful for what you are trying to do?

SDGGiesbrecht avatar Jul 17 '17 03:07 SDGGiesbrecht

/// :nodoc: sounds promising. In my case I'm producing an API and want to hide classes which have to be public, but I don't want developers to see. For example, I was developers to use a variety of final public classes, but not be able to see the parent abstract class they inherit from.

drekka avatar Jul 17 '17 11:07 drekka