Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.
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

@mattt

Description

@mattt

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions