Skip to content

docs: fix code snippets that do not compile#18468

Merged
Lyokone merged 1 commit into
firebase:mainfrom
meliharik:docs-fix-noncompiling-snippets
Jul 22, 2026
Merged

docs: fix code snippets that do not compile#18468
Lyokone merged 1 commit into
firebase:mainfrom
meliharik:docs-fix-noncompiling-snippets

Conversation

@meliharik

Copy link
Copy Markdown
Contributor

Four documentation snippets do not parse as written. Each was verified with dart format --output=none: the block fails to parse before the change and parses after it.

Dartdoc — unterminated string

packages/firebase_core/firebase_core_web/lib/src/firebase_app_web.dart:14
packages/firebase_core/firebase_core_platform_interface/lib/src/method_channel/method_channel_firebase_app.dart:14

-/// Firebase.app('SecondaryApp`);
+/// Firebase.app('SecondaryApp');

Both files close the string with a backtick instead of '. Same line, same typo, presumably copied between the two.

The web file also says "call the the app method" one line above, fixed here too.

docs/perf-mon/_custom-code-traces.md:154 — doubled paren

-customTrace.putAttribute(("email", user.getEmailAddress());  // Don't do this!
+customTrace.putAttribute("email", user.getEmailAddress());  // Don't do this!

To be explicit about intent: the "Don't do this!" warning is about putting personally identifiable information in an attribute, not about the syntax — the "OK" example seven lines above is putAttribute("experiment", "A"); with a single paren. The extra ( is unintended.

docs/auth/email-link-auth.md:102 — leftover closing

     .then((value) => print('Successfully sent email verification'));
-});

The statement already terminates with ; on the previous line; the }); has no matching opener inside the block.

How I found them

I extracted every fenced code block and /// doc comment across the repo and checked paren/bracket balance outside strings and comments, then read each hit in context to separate real typos from intentional fragments. Docs-only change — no behaviour, no tests affected.

@gemini-code-assist

Copy link
Copy Markdown
Contributor
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

@google-cla

google-cla Bot commented Jul 21, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@meliharik

Copy link
Copy Markdown
Contributor Author

@googlebot I signed it!

@meliharik meliharik closed this Jul 21, 2026
@meliharik meliharik reopened this Jul 21, 2026
@meliharik
meliharik force-pushed the docs-fix-noncompiling-snippets branch from 5eabee2 to 489b775 Compare July 21, 2026 06:52
@SelaseKay

Copy link
Copy Markdown
Contributor

Hi @meliharik, thanks for the contribution. LGTM!

@Lyokone
Lyokone merged commit 85cbdca into firebase:main Jul 22, 2026
35 of 41 checks passed
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.

3 participants