Add JavaDoc Java snippet extractor and CI validation workflow#4655
Merged
liannacasper merged 18 commits intomasterfrom Mar 30, 2026
Merged
Add JavaDoc Java snippet extractor and CI validation workflow#4655liannacasper merged 18 commits intomasterfrom
liannacasper merged 18 commits intomasterfrom
Conversation
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
Cloudflare Preview
|
Collaborator
|
Compared 32 screenshots: 32 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
|
Collaborator
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
Description
scripts/extract-javadoc-java-snippets.sh, a portable extractor that scans provided paths (defaults toCodenameOne/src), detects Java markdown fences inside/** */and///doc comments, and emits JSONL records of the form{"sourceFile":"...","symbol":"...","snippetIndex":n,"startLine":n,"endLine":n,"code":"..."}.--package-prefixfiltering to restrict extraction by package name and support passing arbitrary file/dir targets as args..github/workflows/java-snippet-validation.yml, a path-gated workflow that only runs when the snippet tooling/workflow files change, uses a changed-file guard to ensure it only validates on script-only edits, extracts snippets, and validates each snippet by invokingscripts/java-snippet-to-playground-uri.sh.scripts/java-snippet-to-playground-uri.shto cache the compiled harness classes via a stamp file so repeated invocations (batch validation) avoid unnecessary recompilation.Testing
bash -n scripts/extract-javadoc-java-snippets.sh scripts/java-snippet-to-playground-uri.sh, which succeeded.scripts/extract-javadoc-java-snippets.sh CodenameOne/srcand produced436JSONL records, and with--package-prefix com.codename1.uiproduced209records.scripts/java-snippet-to-playground-uri.sh; the extract/emit and harness-invocation plumbing worked, while many snippets producedEVAL_ERRORfrom the harness (these are snippet content evaluation failures that the workflow is intended to catch).scripts/java-snippet-to-playground-uri.shprevents repeated full recompiles during batch validation runs.Codex Task