Support per-gem documentation exclusions - #2688
Open
st0012 wants to merge 1 commit into
Open
Conversation
KaanOzkan
reviewed
Jul 30, 2026
| file_header: options[:file_header], | ||
| include_doc: options[:doc], | ||
| include_doc: doc != false, | ||
| doc_exclude: doc_exclude, |
Contributor
There was a problem hiding this comment.
I like that this hash, true or false setup reads better in the config.yml but I wonder if it's confusing since this defaults to doc: true and exclude: foo. Wdyt?
gem:
doc:
exclude:
- fooCompared to having
gem:
doc: true
exclude_doc:
- foo| end | ||
|
|
||
| doc = options[:doc] | ||
| doc_exclude = doc.is_a?(Hash) ? doc.fetch("exclude", []) : [] |
Contributor
There was a problem hiding this comment.
We have a --config flag which complicates things, imagine someone doing tapioca gem foo --doc --config sorbet/tapioca/config.yml and the config has exclude. In that case I think we should instead respect the exclude flag. We also need a test for this behaviour where they are used together.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Some gems, such as Stripe, can generate 10–20 MB RBI files. Omitting their source comments can substantially reduce those files, while disabling documentation globally also removes useful comments from smaller gem RBIs.
Implementation
gem.docto accept anexcludelist.Tests
Added configuration-validation and end-to-end gem-generation coverage.