FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: remove unreachable dead code in `validateGitmodulesLocations` by jibin7jose · Pull Request #6811 · zed-industries/extensions · GitHub

fix: remove unreachable dead code in validateGitmodulesLocations - #6811

Closed
jibin7jose wants to merge 6 commits into
zed-industries:mainfrom
jibin7jose:fix/remove-dead-code-validateGitmodulesLocations
Closed

jibin7jose wants to merge 6 commits into
zed-industries:mainfrom
jibin7jose:fix/remove-dead-code-validateGitmodulesLocations

Conversation

Copy link
Copy Markdown

Summary

Removes the duplicate if condition on lines 170–174 of src/lib/validation.js
that made the third error block dead code — it could never be reached or executed.

Fixes #6810

What Was Wrong

The function validateGitmodulesLocations had two identical if conditions:

// Line 158 — FIRST check (reachable ✅)
if (submoduleName !== expectedSubmoduleName) {
  throw new Error(`Submodule name ${submoduleName} does not match expected name...`);
}

// Line 170 — THIRD check (❌ DEAD CODE — identical condition)
if (submoduleName !== expectedSubmoduleName) {
  throw new Error(`Extension with ID "${extensionId}" does not use the proper submodule...`);
}

cla-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @jibin7jose on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

cla-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @jibin7jose on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

Copy link
Copy Markdown
Author

@cla-bot check

cla-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @jibin7jose on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

cla-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

cla-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @jibin7jose on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

Copy link
Copy Markdown
Author

@cla-bot check

cla-bot Bot added the cla-signed label Jul 14, 2026

cla-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

Copy link
Copy Markdown
Member

Closing this in favor of #6749, still thanks for getting this up!

MrSubidubi closed this Jul 29, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: validateGitmodulesLocations has unreachable code — third error message is dead code

2 participants


Back | FazBrowse Home | New Git URL