Skip to content

Remove FIXME placeholders from generated doc snippets #36343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mohiuddin-khan-shiam
Copy link

The Python and Java snippet generators (utils/doclint/generatePythonSnippets.js
and utils/doclint/generateJavaSnippets.js) prepended every generated example
with a # FIXME / // FIXME placeholder comment.
These lines leaked into the public docs, confusing readers, polluting copy-pasted
code, and adding unnecessary noise to documentation diffs.

This patch simply removes the placeholder prefix so the generators now emit
clean, production-ready code snippets.

The Python and Java snippet generators ([utils/doclint/generatePythonSnippets.js](cci:7://file:///d:/Github/playwright/utils/doclint/generatePythonSnippets.js:0:0-0:0)
and [utils/doclint/generateJavaSnippets.js](cci:7://file:///d:/Github/playwright/utils/doclint/generateJavaSnippets.js:0:0-0:0)) prepended every generated example
with a `# FIXME` / `// FIXME` placeholder comment.
These lines leaked into the public docs, confusing readers, polluting copy-pasted
code, and adding unnecessary noise to documentation diffs.

This patch simply removes the placeholder prefix so the generators now emit
clean, production-ready code snippets.
Copy link
Member

@mxschmitt mxschmitt left a comment

Choose a reason for hiding this comment

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

I don't think these utilities are used anymore - we can probably remove them.

Copy link
Contributor

Test results for "tests 1"

1 failed
❌ [webkit-library] › library/screenshot.spec.ts:205:14 › element screenshot › element screenshot should work with a mobile viewport @webkit-ubuntu-22.04-node18

3 flaky ⚠️ [firefox-library] › library/inspector/cli-codegen-1.spec.ts:986:7 › cli codegen › should not throw csp directive violation errors @firefox-ubuntu-22.04-node18
⚠️ [webkit-page] › page/page-screenshot.spec.ts:345:5 › page screenshot › should work while navigating @webkit-ubuntu-22.04-node18
⚠️ [playwright-test] › ui-mode-test-watch.spec.ts:145:5 › should watch all @windows-latest-node18-1

39417 passed, 822 skipped
✔️✔️✔️

Merge workflow run.

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