Skip to content

fix(dot-notation): ignore non-ascii property names#840

Merged
graphite-app[bot] merged 1 commit into
mainfrom
c/03-27-fix_dot-notation_ignore_non-ascii_property_names
Mar 27, 2026
Merged

fix(dot-notation): ignore non-ascii property names#840
graphite-app[bot] merged 1 commit into
mainfrom
c/03-27-fix_dot-notation_ignore_non-ascii_property_names

Conversation

@camc314

@camc314 camc314 commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

fixes #828

camc314 commented Mar 27, 2026

Copy link
Copy Markdown
Contributor Author

How to use the Graphite Merge Queue

Add the label 0-merge to this PR to add it to the merge queue.

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.

@camc314 camc314 marked this pull request as ready for review March 27, 2026 11:40
Copilot AI review requested due to automatic review settings March 27, 2026 11:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes dot-notation false positives for non-ASCII property names by avoiding dot-notation suggestions when the computed property name contains non-ASCII characters (e.g., accents, Greek letters).

Changes:

  • Add an ASCII-only identifier check to gate dot-notation suggestions for obj['prop'] style access.
  • Update rule tests to treat non-ASCII property names (e.g., Prénom, π) as valid bracket-notation usage.
  • Update the dot-notation snapshot to reflect the adjusted invalid test set.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
internal/rules/dot_notation/dot_notation.go Changes identifier eligibility logic to skip dot-notation suggestions for non-ASCII names.
internal/rules/dot_notation/dot_notation_test.go Adds valid cases for non-ASCII property names; removes prior invalid expectation for π.
internal/rule_tester/snapshots/dot-notation.snap Updates expected diagnostics due to removed invalid test case.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/rules/dot_notation/dot_notation.go
@camc314 camc314 force-pushed the c/03-27-fix_dot-notation_ignore_non-ascii_property_names branch from 67e3452 to 48dc875 Compare March 27, 2026 11:45
@camc314 camc314 self-assigned this Mar 27, 2026

camc314 commented Mar 27, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

@camc314 camc314 force-pushed the c/03-27-fix_dot-notation_ignore_non-ascii_property_names branch from 48dc875 to 932eca5 Compare March 27, 2026 12:19
@graphite-app graphite-app Bot force-pushed the c/03-27-fix_dot-notation_ignore_non-ascii_property_names branch from 932eca5 to a712148 Compare March 27, 2026 12:27
@graphite-app graphite-app Bot merged commit a712148 into main Mar 27, 2026
8 checks passed
@graphite-app graphite-app Bot removed the 0-merge label Mar 27, 2026
@graphite-app graphite-app Bot deleted the c/03-27-fix_dot-notation_ignore_non-ascii_property_names branch March 27, 2026 12:34
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.

dot-notation: false positive when using accents

2 participants