test(CV03): add test for unquoted multibyte identifiers#2246
test(CV03): add test for unquoted multibyte identifiers#2246
Conversation
Benchmark for 5e61f4dClick to view benchmark
|
There was a problem hiding this comment.
Pull request overview
This PR adds a regression test for a bug where unquoted multibyte identifiers (e.g., 日本語) caused a panic in the CV03 rule. The underlying issue was previously fixed during refactoring when the code was updated to properly handle identifiers without position markers, but test coverage was missing to prevent future regressions.
Changes:
- Added test case
test_pass_unquoted_multibyte_identifierthat verifies CV03 handles unquoted multibyte identifiers without panicking
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| test_pass_unquoted_multibyte_identifier: | ||
| pass_str: | | ||
| SELECT | ||
| 日本語 | ||
| FROM foo | ||
| configs: | ||
| core: | ||
| dialect: duckdb | ||
| rules: | ||
| convention.select_trailing_comma: | ||
| select_clause_trailing_comma: forbid |
There was a problem hiding this comment.
Consider adding a companion test case with select_clause_trailing_comma: require mode to ensure the multibyte identifier handling works correctly in both modes. While the current test is sufficient to catch the panic, testing both modes would provide more comprehensive coverage and better match the pattern established by other tests in this file (which test both require and forbid modes).
CodSpeed Performance ReportMerging this PR will not alter performanceComparing Summary
Footnotes
|
Summary
Fixes #2067
Adds a regression test for the issue where unquoted multibyte identifiers (e.g.,
日本語) would cause a panic in the CV03 rule:The underlying issue was fixed in previous refactoring (the code now properly handles identifiers without position markers), but there was no test coverage to prevent regression.
Test plan
test_pass_unquoted_multibyte_identifierwith DuckDB dialect🤖 Generated with Claude Code