Skip to content

docs(semantic): make doc tests for AstNode::contains_any etc runnable#13595

Merged
graphite-app[bot] merged 1 commit intomainfrom
09-06-docs_semantic_make_doc_tests_for_astnode_contains_any_etc_runnable
Sep 8, 2025
Merged

docs(semantic): make doc tests for AstNode::contains_any etc runnable#13595
graphite-app[bot] merged 1 commit intomainfrom
09-06-docs_semantic_make_doc_tests_for_astnode_contains_any_etc_runnable

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Sep 8, 2025

Follow-on after #13137. That PR added methods to AstNodes, and doc comments include examples.

Make those examples into proper runnable doctests, and fix them (AstType::ExportDeclaration doesn't exist).

@github-actions github-actions bot added A-semantic Area - Semantic C-docs Category - Documentation. Related to user-facing or internal documentation labels Sep 8, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@overlookmotel overlookmotel marked this pull request as ready for review September 8, 2025 11:48
Copilot AI review requested due to automatic review settings September 8, 2025 11:48
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 makes documentation examples in AstNodes methods runnable as proper doctests by adding necessary imports and setup code. The changes fix one incorrect type reference (AstType::ExportDeclaration to AstType::ExportNamedDeclaration) and transform three documentation examples from non-runnable to runnable doctests.

  • Convert non-runnable doc examples to proper doctests with required imports and setup
  • Fix incorrect AST type reference in documentation examples
  • Improve code formatting and comments in the examples

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@overlookmotel
Copy link
Member Author

Uncontroversial change just to doc comments, so merging without review.

@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Sep 8, 2025
@overlookmotel overlookmotel removed the request for review from Dunqing September 8, 2025 11:49
Copy link
Member Author

overlookmotel commented Sep 8, 2025

Merge activity

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 8, 2025

CodSpeed Instrumentation Performance Report

Merging #13595 will not alter performance

Comparing 09-06-docs_semantic_make_doc_tests_for_astnode_contains_any_etc_runnable (5dc82ff) with main (8d30bce)1

Summary

✅ 37 untouched benchmarks

Footnotes

  1. No successful run was found on main (fd277b4) during the generation of this report, so 8d30bce was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

…le (#13595)

Follow-on after #13137. That PR added methods to `AstNodes`, and doc comments include examples.

Make those examples into proper runnable doctests, and fix them (`AstType::ExportDeclaration` doesn't exist).
@graphite-app graphite-app bot force-pushed the 09-06-docs_semantic_make_doc_tests_for_astnode_contains_any_etc_runnable branch from 9eb96c2 to 5dc82ff Compare September 8, 2025 12:08
@graphite-app graphite-app bot merged commit 5dc82ff into main Sep 8, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 09-06-docs_semantic_make_doc_tests_for_astnode_contains_any_etc_runnable branch September 8, 2025 12:13
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-semantic Area - Semantic 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