Skip to content

Conversation

@jdx
Copy link
Owner

@jdx jdx commented Jan 19, 2026

Summary

  • Add comprehensive rustdoc documentation for CompleteOptions struct and all its fields
  • Document complete() function with arguments, return value, and supported shells list
  • Expand documentation for Spec::parse_file() explaining auto-detection behavior
  • Expand documentation for Spec::parse_script() explaining comment extraction

Note: SpecMount::parse() is pub(crate) (internal only), so public documentation is not required.

Test plan

  • cargo build compiles successfully
  • All tests pass

🤖 Generated with Claude Code


Note

Improves public API documentation for completion generation and spec parsing.

  • Documents all fields of CompleteOptions and the complete() function, including arguments, return type, and supported shells (bash, fish, zsh, powershell).
  • Expands Spec::parse_file docs to explain auto-detection of .kdl/.usage.kdl vs embedded USAGE comments and defaulting bin to the filename.
  • Expands Spec::parse_script docs to detail extraction from # USAGE:/// USAGE: markers and the bin defaulting behavior.

Written by Cursor Bugbot for commit 44465d6. This will update automatically on new commits. Configure here.

Add documentation for:
- CompleteOptions struct and all its fields
- complete() function with arguments, return value, and supported shells
- Spec::parse_file() with detection behavior description
- Spec::parse_script() with comment extraction description

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 19, 2026 19:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive rustdoc documentation for the public API of the completion generation and spec parsing functionality. The documentation improves discoverability and usability of the library's public interface.

Changes:

  • Added detailed rustdoc for CompleteOptions struct and all its public fields
  • Documented complete() function with arguments, return value, and list of supported shells
  • Enhanced Spec::parse_file() documentation to explain auto-detection behavior between KDL files and scripts
  • Enhanced Spec::parse_script() documentation to clarify comment extraction mechanism

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lib/src/complete/mod.rs Added comprehensive rustdoc for CompleteOptions struct fields and complete() function
lib/src/spec/mod.rs Enhanced documentation for parse_file() and parse_script() methods to explain their auto-detection and extraction behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

/// Parse a spec from a script file's USAGE comments.
/// Parse a spec from a script file's embedded USAGE comments.
///
/// Extracts the spec from comment lines starting with `# USAGE:` or `// USAGE:`.
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation states that only # USAGE: and // USAGE: are supported, but the actual implementation in extract_usage_from_comments also supports ::USAGE (for languages like Ada or SQL), [USAGE] variations, and optional spacing after the comment marker. The documentation should accurately reflect all supported formats or use more general language.

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Jan 19, 2026

Codecov Report

❌ Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.26%. Comparing base (9df7c86) to head (44465d6).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
lib/src/spec/mod.rs 0.00% 11 Missing ⚠️
lib/src/complete/mod.rs 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #450      +/-   ##
==========================================
- Coverage   47.36%   47.26%   -0.10%     
==========================================
  Files          47       47              
  Lines        6653     6671      +18     
  Branches     6653     6671      +18     
==========================================
+ Hits         3151     3153       +2     
- Misses       1739     1757      +18     
+ Partials     1763     1761       -2     

☔ View full report in Codecov by Sentry.
📢 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.

@jdx jdx merged commit 2836aa9 into main Jan 19, 2026
9 of 11 checks passed
@jdx jdx deleted the docs/add-rustdoc branch January 19, 2026 19:44
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.

2 participants