Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Add option to generate subcommand for specifying which access levels are included #72

Closed
mattt opened this issue Apr 10, 2020 · 1 comment · Fixed by #219
Closed

Add option to generate subcommand for specifying which access levels are included #72

mattt opened this issue Apr 10, 2020 · 1 comment · Fixed by #219
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@mattt
Copy link
Contributor

mattt commented Apr 10, 2020

My original motivation for swift-doc was to generate documentation for libraries. However, as the tool gains wider adoption, teams will likely want to use it internally for their own apps. The major difference between libraries and apps is that apps are typically much less concerned about ACL (if all of your code is in a single app target, everything "just works").

Rather than force teams to change their code in a way that would otherwise provide no immediate benefit (i.e. sprinkling public throughout their code base), I think it would make sense to provide an option for internal declarations to be included in the generated output.

As far as how this should work:

  • The current behavior of only looking for public or open declarations should probably continue to be the default.
  • To help folks who might be confused about nothing happening when they run swift doc generate (documented only some pods #70), we should communicate something like "No public declarations found, set the (option) flag to...).
  • To accommodate future distinctions, this option should probably take an enumerated value rather than a Boolean. So --minimum-access-level internal instead of --include-internal-declarations.
  • And, of course, this should be documented. I think a "Getting Started" guide should be considered a P1 for our 1.0.0 release. (Write a "Getting Started" guide #73)
@byron22seven
Copy link

Hi 👋
Has there been any movement on this? 😃

I see there's an open PR with some conflicts... Would be really helpful 😊

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants