Skip to content

Conversation

@chenjiahan
Copy link
Member

Summary

  • Adds missing break statements in switch cases.
  • Enables Biomes's noFallthroughSwitchClause rule to disallow fallthrough of switch clauses.

Related links

Fix #11771

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings September 30, 2025 03:08
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Sep 30, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes missing break statements in switch cases to prevent unintended fallthrough behavior and enables Biome's noFallthroughSwitchClause linting rule to prevent similar issues in the future.

  • Adds missing break statements to three switch case blocks across the codebase
  • Enables the noFallthroughSwitchClause rule in Biome configuration to enforce proper switch case handling

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/rspack/src/logging/createConsoleLogger.ts Adds break statement to prevent fallthrough in logging switch case
packages/rspack/src/loader-runner/worker.ts Adds break statement to loader state switch case
packages/rspack/src/loader-runner/index.ts Adds break statement to GetLogger request type case
biome.jsonc Enables noFallthroughSwitchClause rule to prevent future fallthrough issues

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions github-actions bot added the release: bug fix release: bug related release(mr only) label Sep 30, 2025
@netlify
Copy link

netlify bot commented Sep 30, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 48d976f
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/68db4c477e85d7000784fe79

@github-actions
Copy link
Contributor

📦 Binary Size-limit

Comparing 48d976f to chore(deps): update swc (#11747) by renovate[bot]

❌ Size increased by 8.50KB from 47.89MB to 47.90MB (⬆️0.02%)

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 30, 2025

CodSpeed Performance Report

Merging #11794 will not alter performance

Comparing switch_cases_0930 (48d976f) with main (52ee813)

Summary

✅ 17 untouched

@chenjiahan chenjiahan enabled auto-merge (squash) September 30, 2025 03:45
@chenjiahan chenjiahan merged commit 637a26d into main Sep 30, 2025
44 checks passed
@chenjiahan chenjiahan deleted the switch_cases_0930 branch September 30, 2025 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: parallel loader emit error after logging anything

3 participants