Skip to content

docs(rust): add missing rustdocs and remove missing_docs lint attrs#19306

Merged
graphite-app[bot] merged 1 commit intomainfrom
chore/docs-and-missing-doc-lints
Feb 12, 2026
Merged

docs(rust): add missing rustdocs and remove missing_docs lint attrs#19306
graphite-app[bot] merged 1 commit intomainfrom
chore/docs-and-missing-doc-lints

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Feb 12, 2026

Summary

  • add rustdoc comments for remaining public APIs in:
    • oxc_transformer
    • oxc_isolated_declarations
    • oxc_semantic
  • remove all #![warn(missing_docs)] crate attributes
  • remove all #![expect(missing_docs)] and #[expect(missing_docs)] attributes
  • update AST kind generator template and regenerate so generated code no longer reintroduces missing-doc lint expectations

Validation

  • just fmt
  • just ast
  • cargo rustc -p oxc_ast --lib -- -Dmissing-docs
  • cargo rustc -p oxc_codegen --lib -- -Dmissing-docs
  • cargo rustc -p oxc_transformer --lib -- -Dmissing-docs
  • cargo rustc -p oxc_isolated_declarations --lib -- -Dmissing-docs
  • cargo rustc -p oxc_semantic --lib -- -Dmissing-docs
  • cargo rustc -p oxc_span --lib -- -Dmissing-docs
  • cargo check -p oxc_transformer -p oxc_isolated_declarations -p oxc_semantic
  • cargo check -p oxc_ast -p oxc_syntax -p oxc_str -p oxc_parser -p oxc_codegen -p oxc_span -p oxc_allocator -p oxc_data_structures -p oxc_macros

AI usage disclosure

This PR was prepared with AI assistance (Codex / GPT-5). I reviewed and validated the generated changes and take responsibility for the final content.

Copilot AI review requested due to automatic review settings February 12, 2026 08:35
@github-actions github-actions bot added A-parser Area - Parser A-semantic Area - Semantic A-ast Area - AST A-transformer Area - Transformer / Transpiler A-codegen Area - Code Generation A-isolated-declarations Isolated Declarations A-ast-tools Area - AST tools labels Feb 12, 2026
@Boshen Boshen changed the title docs: add missing rustdocs and remove missing_docs lint attrs docs(rust): add missing rustdocs and remove missing_docs lint attrs Feb 12, 2026
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Feb 12, 2026
@github-actions github-actions bot added the C-docs Category - Documentation. Related to user-facing or internal documentation label Feb 12, 2026
Copy link
Member Author

Boshen commented Feb 12, 2026

Merge activity

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 12, 2026

Merging this PR will not alter performance

✅ 47 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing chore/docs-and-missing-doc-lints (4359b74) with main (16907e4)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

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 removes missing_docs lint attributes/expectations across several crates and adds rustdoc comments to remaining public APIs (notably in oxc_transformer, oxc_isolated_declarations, and oxc_semantic). It also updates the AST kind generator template and regenerates the output so generated code no longer inserts missing_docs expectations.

Changes:

  • Added rustdoc comments for many public structs/enums/methods in transformer/semantic/isolated-declarations.
  • Removed #![warn(missing_docs)], #![expect(missing_docs)], and #[expect(missing_docs)] usages in multiple crates and generated outputs.
  • Updated AstKind generator template and regenerated crates/oxc_ast/src/generated/ast_kind.rs.

Reviewed changes

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

Show a summary per file
File Description
tasks/ast_tools/src/generators/ast_kind.rs Stops emitting a missing_docs expectation header in generated ast_kind.rs.
crates/oxc_transformer/src/typescript/options.rs Adds rustdocs for TypeScript options and helpers.
crates/oxc_transformer/src/proposals/options.rs Adds rustdoc for proposal options struct.
crates/oxc_transformer/src/plugins/styled_components.rs Adds rustdoc for styled-components options.
crates/oxc_transformer/src/plugins/options.rs Adds rustdocs for plugin options and fields.
crates/oxc_transformer/src/options/module.rs Documents Module variants.
crates/oxc_transformer/src/options/mod.rs Documents helper_loader field in TransformOptions.
crates/oxc_transformer/src/options/env.rs Adds rustdocs for EnvOptions and sub-option fields.
crates/oxc_transformer/src/options/babel/mod.rs Adds rustdocs for BabelOptions fields and query methods.
crates/oxc_transformer/src/options/babel/env/mod.rs Adds rustdocs for BabelEnvOptions and BabelModule variants.
crates/oxc_transformer/src/lib.rs Adds rustdocs for Transformer/TransformerReturn public API.
crates/oxc_transformer/src/jsx/options.rs Adds rustdocs for JSX runtime/options APIs.
crates/oxc_transformer/src/es2026/options.rs Adds rustdocs for ES2026 options.
crates/oxc_transformer/src/es2022/options.rs Adds rustdocs for ES2022 options.
crates/oxc_transformer/src/es2022/class_properties/mod.rs Adds rustdocs for class properties options.
crates/oxc_transformer/src/es2021/options.rs Adds rustdocs for ES2021 options.
crates/oxc_transformer/src/es2020/options.rs Adds rustdocs for ES2020 options.
crates/oxc_transformer/src/es2019/options.rs Adds rustdocs for ES2019 options.
crates/oxc_transformer/src/es2018/options.rs Adds rustdocs for ES2018 options.
crates/oxc_transformer/src/es2017/options.rs Adds rustdocs for ES2017 options.
crates/oxc_transformer/src/es2016/options.rs Adds rustdocs for ES2016 options.
crates/oxc_transformer/src/es2015/options.rs Adds rustdocs for ES2015 options.
crates/oxc_transformer/src/es2015/arrow_functions.rs Adds rustdocs for arrow function transform options.
crates/oxc_transformer/src/decorator/options.rs Adds rustdocs for decorator options.
crates/oxc_transformer/src/compiler_assumptions.rs Adds rustdocs for compiler assumption fields.
crates/oxc_transformer/src/common/helper_loader.rs Adds rustdocs for helper-loader mode and Helper variants/methods.
crates/oxc_syntax/src/symbol.rs Removes file-level missing_docs expectation.
crates/oxc_syntax/src/scope.rs Removes file-level missing_docs expectation.
crates/oxc_syntax/src/reference.rs Removes file-level missing_docs expectation.
crates/oxc_syntax/src/precedence.rs Removes file-level missing_docs expectation.
crates/oxc_syntax/src/number.rs Removes file-level missing_docs expectation.
crates/oxc_syntax/src/module_record.rs Removes #[expect(missing_docs)] on a public trait.
crates/oxc_syntax/src/identifier.rs Removes file-level missing_docs expectation.
crates/oxc_syntax/src/es_target.rs Removes #[expect(missing_docs)] on ESTarget.
crates/oxc_syntax/src/class.rs Removes file-level missing_docs expectation.
crates/oxc_str/src/lib.rs Removes crate-level #![warn(missing_docs)].
crates/oxc_str/src/ident.rs Removes #[expect(missing_docs)] from public const idents.
crates/oxc_span/src/lib.rs Removes crate-level #![warn(missing_docs)].
crates/oxc_semantic/src/stats.rs Adds rustdocs for Stats fields.
crates/oxc_semantic/src/scoping.rs Adds rustdocs for multiple public Scoping APIs.
crates/oxc_semantic/src/node/nodes.rs Adds rustdocs for node accessors.
crates/oxc_semantic/src/lib.rs Adds rustdocs for public Semantic APIs.
crates/oxc_semantic/src/is_global_reference.rs Adds rustdocs for trait methods.
crates/oxc_semantic/src/builder.rs Adds rustdocs for builder return/new APIs.
crates/oxc_parser/src/lib.rs Removes crate-level #![warn(missing_docs)].
crates/oxc_macros/src/lib.rs Removes crate-level #![warn(missing_docs)].
crates/oxc_isolated_declarations/src/lib.rs Adds rustdocs for options/return/transformer APIs.
crates/oxc_isolated_declarations/src/enum.rs Adds rustdoc for enum transform method.
crates/oxc_data_structures/src/lib.rs Removes crate-level #![warn(missing_docs)].
crates/oxc_codegen/src/lib.rs Removes crate-level #![warn(missing_docs)].
crates/oxc_ast/src/lib.rs Removes crate-level #![warn(missing_docs)].
crates/oxc_ast/src/generated/ast_kind.rs Regenerated output without missing_docs expectation header.
crates/oxc_ast/src/ast_impl/ts.rs Removes crate-level #![warn(missing_docs)].
crates/oxc_ast/src/ast_impl/js.rs Removes crate-level #![warn(missing_docs)].
crates/oxc_ast/src/ast_builder_impl.rs Removes crate-level #![warn(missing_docs)].
crates/oxc_ast/src/ast/comment.rs Removes crate-level #![warn(missing_docs)].
crates/oxc_allocator/src/lib.rs Removes crate-level #![warn(missing_docs)].

…19306)

## Summary
- add rustdoc comments for remaining public APIs in:
  - `oxc_transformer`
  - `oxc_isolated_declarations`
  - `oxc_semantic`
- remove all `#![warn(missing_docs)]` crate attributes
- remove all `#![expect(missing_docs)]` and `#[expect(missing_docs)]` attributes
- update AST kind generator template and regenerate so generated code no longer reintroduces missing-doc lint expectations

## Validation
- `just fmt`
- `just ast`
- `cargo rustc -p oxc_ast --lib -- -Dmissing-docs`
- `cargo rustc -p oxc_codegen --lib -- -Dmissing-docs`
- `cargo rustc -p oxc_transformer --lib -- -Dmissing-docs`
- `cargo rustc -p oxc_isolated_declarations --lib -- -Dmissing-docs`
- `cargo rustc -p oxc_semantic --lib -- -Dmissing-docs`
- `cargo rustc -p oxc_span --lib -- -Dmissing-docs`
- `cargo check -p oxc_transformer -p oxc_isolated_declarations -p oxc_semantic`
- `cargo check -p oxc_ast -p oxc_syntax -p oxc_str -p oxc_parser -p oxc_codegen -p oxc_span -p oxc_allocator -p oxc_data_structures -p oxc_macros`

## AI usage disclosure
This PR was prepared with AI assistance (Codex / GPT-5). I reviewed and validated the generated changes and take responsibility for the final content.
@graphite-app graphite-app bot force-pushed the chore/docs-and-missing-doc-lints branch from 4359b74 to 569aa61 Compare February 12, 2026 08:41
@graphite-app graphite-app bot merged commit 569aa61 into main Feb 12, 2026
21 of 22 checks passed
@graphite-app graphite-app bot deleted the chore/docs-and-missing-doc-lints branch February 12, 2026 08:48
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Feb 12, 2026
Limerio pushed a commit to Limerio/oxc that referenced this pull request Feb 12, 2026
…xc-project#19306)

## Summary
- add rustdoc comments for remaining public APIs in:
  - `oxc_transformer`
  - `oxc_isolated_declarations`
  - `oxc_semantic`
- remove all `#![warn(missing_docs)]` crate attributes
- remove all `#![expect(missing_docs)]` and `#[expect(missing_docs)]` attributes
- update AST kind generator template and regenerate so generated code no longer reintroduces missing-doc lint expectations

## Validation
- `just fmt`
- `just ast`
- `cargo rustc -p oxc_ast --lib -- -Dmissing-docs`
- `cargo rustc -p oxc_codegen --lib -- -Dmissing-docs`
- `cargo rustc -p oxc_transformer --lib -- -Dmissing-docs`
- `cargo rustc -p oxc_isolated_declarations --lib -- -Dmissing-docs`
- `cargo rustc -p oxc_semantic --lib -- -Dmissing-docs`
- `cargo rustc -p oxc_span --lib -- -Dmissing-docs`
- `cargo check -p oxc_transformer -p oxc_isolated_declarations -p oxc_semantic`
- `cargo check -p oxc_ast -p oxc_syntax -p oxc_str -p oxc_parser -p oxc_codegen -p oxc_span -p oxc_allocator -p oxc_data_structures -p oxc_macros`

## AI usage disclosure
This PR was prepared with AI assistance (Codex / GPT-5). I reviewed and validated the generated changes and take responsibility for the final content.
camc314 pushed a commit that referenced this pull request Feb 16, 2026
### 🚀 Features

- 429d876 semantic: Assign ast node ids during semantic build (#19263)
(Boshen)
- ebb80b3 ast: Add `node_id` field to all AST struct nodes (#18138)
(Boshen)

### 🐛 Bug Fixes

- bfb15a3 semantic: Make multi_index_vec clone panic-safe (#19299)
(Boshen)
- 41c50a5 transformer: Ignore invalid JSX pragma identifiers (#19296)
(Boshen)
- deed3d8 transformer: Remove unnecessary trailing expression in object
rest spread assignment (#19259) (Boshen)
- 5bdaacc transformer: Propagate source spans for sourcemap correctness
(#19258) (Boshen)
- 3e0e5ba isolated-declarations: Align readonly class array initializer
diagnostics with tsc (#19218) (camc314)

### ⚡ Performance

- c169c77 syntax: Optimize `is_identifier_name_patched` (#19386)
(sapphi-red)
- aa1e1a8 allocator: Inline BitSet accessors (#19331) (Boshen)
- 5b90d46 semantic: Improve SoA with multi index vec (#19138) (Boshen)
- 99ce2a6 isolated_declarations: Mark all diagnostic functions as
`#[cold]` (#19279) (camc314)
- dd0220f transformer: Remove TS-only nodes earlier in
`enter_statements` (#19166) (Dunqing)
- e5baf60 isolated-declarations: Replace hash collections with
index-based Vec (#19221) (Dunqing)

### 📚 Documentation

- 569aa61 rust: Add missing rustdocs and remove missing_docs lint attrs
(#19306) (Boshen)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ast Area - AST A-ast-tools Area - AST tools A-codegen Area - Code Generation A-isolated-declarations Isolated Declarations A-parser Area - Parser A-semantic Area - Semantic A-transformer Area - Transformer / Transpiler C-docs Category - Documentation. Related to user-facing or internal documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants