Skip to content

feat: add outline extractor options#2745

Merged
HerringtonDarkholme merged 1 commit into
mainfrom
outline-extractor-options
Jun 19, 2026
Merged

feat: add outline extractor options#2745
HerringtonDarkholme merged 1 commit into
mainfrom
outline-extractor-options

Conversation

@HerringtonDarkholme

@HerringtonDarkholme HerringtonDarkholme commented Jun 19, 2026

Copy link
Copy Markdown
Member

Stacked on #2744.\n\nThis PR introduces core outline extractor options for item/member filters and entry detail without wiring them into extraction yet.

Summary by CodeRabbit

  • New Features
    • Added a new public options module for the outline crate.
    • Introduced configurable outline extraction options, including symbol-type allowlists, import/export filtering, and output detail selection (name vs. signature).
    • Added member-level options to optionally include member details, including configurable public-member filtering.
  • Documentation
    • Exposed the new options through the public API so callers can customize outline generation behavior.

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

A new options.rs module is added to the outline crate and exported from lib.rs. It defines OutlineExtractorOptions with symbol-type, import/export, and entry-detail filters, plus optional member-filtering configuration. The module implements matching and filtering logic for both concrete outline items and serializable rules at extraction time.

Changes

Outline Extractor Options Module

Layer / File(s) Summary
Public types and module export
crates/outline/src/lib.rs, crates/outline/src/options.rs
Exports pub mod options from lib.rs and defines OutlineExtractorOptions with symbol-type, import, and export filters; OutlineMemberOptions for member-level filtering; OutlineFlagFilter ternary boolean-like enum; and OutlineEntryDetail for name/signature selection, each with Default impls.
Item and member matching logic
crates/outline/src/options.rs
Implements matches_item and filter_members for concrete-object runtime filtering, matches_item_rule and matches_member_rule for serializable rule evaluation using predicate matching, internal OutlineFlagFilter matching behavior for direct boolean values and rule predicates with configured defaults, and matches_symbol_type symbol-type allowlist utility.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐇 A new options module hops into the crate,
With filters for items and members — how great!
Flag filters say Any, or Yes, or say No,
Symbol types narrowed, predicates flow,
The outline extracts just what you need to know! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add outline extractor options' directly and clearly summarizes the main change: introducing new options structures for the outline extractor module.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch outline-extractor-options

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Base automatically changed from outline-simplify-code to main June 19, 2026 21:07
@HerringtonDarkholme
HerringtonDarkholme force-pushed the outline-extractor-options branch from 19f528f to 49c910a Compare June 19, 2026 21:18
Comment thread crates/outline/src/options.rs Outdated
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.74214% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.05%. Comparing base (20e3b84) to head (eb352aa).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crates/outline/src/options.rs 98.74% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2745      +/-   ##
==========================================
+ Coverage   85.95%   86.05%   +0.09%     
==========================================
  Files         125      126       +1     
  Lines       22060    22219     +159     
==========================================
+ Hits        18962    19120     +158     
- Misses       3098     3099       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread crates/outline/src/options.rs
@HerringtonDarkholme
HerringtonDarkholme force-pushed the outline-extractor-options branch from 49c910a to 94a804a Compare June 19, 2026 21:27
Comment thread crates/outline/src/options.rs
Comment thread crates/outline/src/options.rs
Comment thread crates/outline/src/options.rs Outdated
Comment thread crates/outline/src/options.rs Outdated
Comment thread crates/outline/src/options.rs Outdated
Comment thread crates/outline/src/options.rs Outdated
Comment thread crates/outline/src/options.rs Outdated
@HerringtonDarkholme
HerringtonDarkholme force-pushed the outline-extractor-options branch from 94a804a to 2e06965 Compare June 19, 2026 21:40
Comment thread crates/outline/src/options.rs
Comment thread crates/outline/src/options.rs Outdated
Comment thread crates/outline/src/options.rs Outdated
Comment thread crates/outline/src/options.rs Outdated
@HerringtonDarkholme
HerringtonDarkholme force-pushed the outline-extractor-options branch 3 times, most recently from daeb138 to 192df1a Compare June 19, 2026 22:05
@HerringtonDarkholme
HerringtonDarkholme force-pushed the outline-extractor-options branch from 192df1a to eb352aa Compare June 19, 2026 22:11
@HerringtonDarkholme
HerringtonDarkholme added this pull request to the merge queue Jun 19, 2026
Merged via the queue into main with commit 845ca50 Jun 19, 2026
4 checks passed
@HerringtonDarkholme
HerringtonDarkholme deleted the outline-extractor-options branch June 19, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant