Skip to content

Comments

test(linter/switch-case-braces): add test for comment between case expression and colon#15754

Merged
graphite-app[bot] merged 1 commit intomainfrom
c/11-16-test_linter_switch-case-braces_add_test_for_comment_between_case_expression_and_colon
Nov 16, 2025
Merged

test(linter/switch-case-braces): add test for comment between case expression and colon#15754
graphite-app[bot] merged 1 commit intomainfrom
c/11-16-test_linter_switch-case-braces_add_test_for_comment_between_case_expression_and_colon

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Nov 16, 2025

Adds a test case to ensure the fixer correctly handles switch cases where a comment appears between the test expression and the colon, such as case 'a'/* comment */:. This regression test verifies the fix for the is_inside_comment off-by-one bug.

@github-actions github-actions bot added A-linter Area - Linter C-test Category - Testing. Code is missing test cases, or a PR is adding them labels Nov 16, 2025
Copy link
Contributor Author

camc314 commented Nov 16, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 16, 2025

Merge activity

…pression and colon (#15754)

Adds a test case to ensure the fixer correctly handles switch cases where a comment appears between the test expression and the colon, such as `case 'a'/* comment */:`. This regression test verifies the fix for the `is_inside_comment` off-by-one bug.
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 16, 2025

CodSpeed Performance Report

Merging #15754 will not alter performance

Comparing c/11-16-test_linter_switch-case-braces_add_test_for_comment_between_case_expression_and_colon (5815c08) with main (1decd57)1

Summary

✅ 4 untouched
⏩ 33 skipped2

Footnotes

  1. No successful run was found on main (e0728fa) during the generation of this report, so 1decd57 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 33 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@graphite-app graphite-app bot force-pushed the c/11-16-fix_ast_exclude_comment_end_position_from_is_inside_comment_check branch from bade05c to e0728fa Compare November 16, 2025 23:17
@graphite-app graphite-app bot force-pushed the c/11-16-test_linter_switch-case-braces_add_test_for_comment_between_case_expression_and_colon branch from 54f9675 to 5815c08 Compare November 16, 2025 23:17
Base automatically changed from c/11-16-fix_ast_exclude_comment_end_position_from_is_inside_comment_check to main November 16, 2025 23:22
@graphite-app graphite-app bot merged commit 5815c08 into main Nov 16, 2025
21 checks passed
@graphite-app graphite-app bot deleted the c/11-16-test_linter_switch-case-braces_add_test_for_comment_between_case_expression_and_colon branch November 16, 2025 23:23
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
…pression and colon (oxc-project#15754)

Adds a test case to ensure the fixer correctly handles switch cases where a comment appears between the test expression and the colon, such as `case 'a'/* comment */:`. This regression test verifies the fix for the `is_inside_comment` off-by-one bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant