SourceKitten icon indicating copy to clipboard operation
SourceKitten copied to clipboard

Add ability to specify which files should be included and excluded when documenting a module.

Open mrabiciu opened this issue 4 years ago • 1 comments

This change allows us to pass in a list of files to explicitly include and explicitly exclude from the doc command. This can dramatically improve parsing performance for large projects where we only need to document a subset of the files.

This change is specifically targeted at jazzy's use case and is meant to mirror the behavior of the include and exclude flags from that package. Currently the entire module is parsed even if jazzy is given include and exclude flags. With this change jazzy should be able to forward these flags to sourcekitten

In our case this change was able to reduce the parsing time by 80% when generating docs, going from 15 minutes to 3 minutes.

mrabiciu avatar Jun 02 '21 19:06 mrabiciu

This looks like a good idea, have had a few jazzy users wanting this kind of thing.

Could do with some unit tests for those extensions. NSPredicate is incomplete on non-Darwin so I think that part needs a different approach.

What should we do about objc mode?

See CONTRIBUTING.md for changelog advice.

johnfairh avatar Jun 04 '21 10:06 johnfairh