Skip to content

chore: fix "unused paramter" lint in vscode#2119

Merged
drstrangelooker merged 4 commits into
mainfrom
fix-unused-parameter-lint
Dec 18, 2025
Merged

chore: fix "unused paramter" lint in vscode#2119
drstrangelooker merged 4 commits into
mainfrom
fix-unused-parameter-lint

Conversation

@drstrangelooker

Copy link
Copy Markdown
Contributor

Description

Remove warning about unused parameter in vscode

PR Checklist

Thank you for opening a Pull Request! Before submitting your PR, there are a
few things you can do to make sure it goes smoothly:

  • Make sure you reviewed
    CONTRIBUTING.md
  • [] Make sure to open an issue as a
    bug/issue
    before writing your code! That way we can discuss the change, evaluate
    designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)
  • Make sure to add ! if this involve a breaking change

@drstrangelooker drstrangelooker requested a review from a team December 4, 2025 19:30
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @drstrangelooker, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on improving code hygiene by addressing a specific linting warning related to an unused parameter. The change ensures that the codebase adheres to best practices and reduces unnecessary warnings, contributing to a cleaner and more maintainable project without altering any functional behavior.

Highlights

  • Linting Fix: Resolved an 'unused parameter' lint warning in VS Code by modifying the write function signature in internal/server/mcp.go. The context.Context parameter is now explicitly marked as unused using the blank identifier _.
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 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 counter productive. 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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request addresses an "unused parameter" linting warning by renaming the ctx parameter to the blank identifier _. While this change is correct, I've identified a more critical issue in the same function: the error returned by json.Marshal is being ignored. I've added a review comment with a code suggestion to handle this error, which will prevent potential silent failures and make the code more robust.

Comment thread internal/server/mcp.go Outdated
@drstrangelooker drstrangelooker enabled auto-merge (squash) December 4, 2025 19:48
@drstrangelooker drstrangelooker force-pushed the fix-unused-parameter-lint branch from bc8e1d3 to 2fb8bfe Compare December 5, 2025 15:54
@drstrangelooker drstrangelooker force-pushed the fix-unused-parameter-lint branch from 2fb8bfe to a8c52c4 Compare December 5, 2025 20:22
@drstrangelooker drstrangelooker merged commit e1bd98e into main Dec 18, 2025
11 checks passed
@drstrangelooker drstrangelooker deleted the fix-unused-parameter-lint branch December 18, 2025 17:09
github-actions Bot pushed a commit to Jaleel-zhu/genai-toolbox that referenced this pull request Dec 18, 2025
## Description

Remove warning about unused parameter in vscode

## PR Checklist

> Thank you for opening a Pull Request! Before submitting your PR, there
are a
> few things you can do to make sure it goes smoothly:

- [x] Make sure you reviewed

[CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md)
- [] Make sure to open an issue as a

[bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose)
  before writing your code! That way we can discuss the change, evaluate
  designs, and agree on the general idea
- [x] Ensure the tests and linter pass
- [x] Code coverage does not decrease (if any source code was changed)
- [x] Appropriate docs were updated (if necessary)
- [x] Make sure to add `!` if this involve a breaking change e1bd98e
vinodhinic pushed a commit to vinodhinic/genai-toolbox that referenced this pull request Jan 14, 2026
## Description

Remove warning about unused parameter in vscode

## PR Checklist

> Thank you for opening a Pull Request! Before submitting your PR, there
are a
> few things you can do to make sure it goes smoothly:

- [x] Make sure you reviewed

[CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md)
- [] Make sure to open an issue as a

[bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose)
  before writing your code! That way we can discuss the change, evaluate
  designs, and agree on the general idea
- [x] Ensure the tests and linter pass
- [x] Code coverage does not decrease (if any source code was changed)
- [x] Appropriate docs were updated (if necessary)
- [x] Make sure to add `!` if this involve a breaking change
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