Skip to content

Fix: ignore comments in unreachable statement check.#1478

Open
nikirovast wants to merge 2 commits into
bazelbuild:mainfrom
nikirovast:fix/unreachable-ignore-comments
Open

Fix: ignore comments in unreachable statement check.#1478
nikirovast wants to merge 2 commits into
bazelbuild:mainfrom
nikirovast:fix/unreachable-ignore-comments

Conversation

@nikirovast

Copy link
Copy Markdown
Collaborator

Buildtools PR checklist

  • The code in this PR is covered by unit/integration tests.
  • I have tested these changes and provide testing instructions below.
  • I have either responded to, or resolved all Gemini comments on the PR.
  • I have read Google Eng Practices on Small Changes, this PR either follows these guidelines or the description provides reasoning for why they can not be followed.

Description

What does this PR do? Please follow Google Eng Practices - Description

(optional) These changes were tested using the following steps

Steps to reproduce / test the PR changes (if anything besides unit tests).

@nikirovast nikirovast requested a review from a team as a code owner June 18, 2026 10:18
@nikirovast nikirovast requested review from oreflow and removed request for a team June 18, 2026 10:18

@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 updates the unreachable statement detection logic in warn/warn_control_flow.go to ignore comment blocks, preventing false positive warnings for comments placed after terminal statements (such as fail). A corresponding test case has been added to warn/warn_control_flow_test.go to verify this behavior. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@nikirovast nikirovast requested a review from vladmos June 18, 2026 10:28
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.

1 participant