Implement code points validator - #888
Conversation
|
Thank you for creating this PR! I will try to review and merge it in the next weeks. 🙏 |
|
I might export the implementation of |
|
I just want to let you know that I am focusing on our v1 release first before reviewing this PR. |
|
That's not good news. I'll wait for v1.1.0. |
|
Yes, feel free to create your own package. No permission required. |
f41426c to
d713dfe
Compare
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@fabian-hiller rebased to main (no additional changes) |
|
Fix done. Could you allow this PR to run CIs? |
commit: |
|
Sorry for my late reply. 😐 I updated the branch and triggered CI. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 45 out of 45 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (2)
library/src/actions/codePoints/codePoints.ts:125
- The default issue message is built as
Invalid ${label}in_addIssue. Using the labelcode_pointswill surface an underscore in user-facing messages ("Invalid code_points"). Consider using a human-readable label likecode points(matching the docs/terminology).
_addIssue(this, 'code_points', dataset, config, {
library/src/utils/_getCodePointCount/_getCodePointCount.ts:17
- The inline comments are misleading: the last code unit of a JS string can be a lone high surrogate in an ill-formed sequence, and
codePointAt(i)can’t beundefinedhere because the loop bounds keepiin-range. Updating the comments would make the intent clearer without changing behavior.
// The last code unit of the input cannot be the start of a surrogate pair
const lengthMinus1 = input.length - 1;
for (let i = 0; i < lengthMinus1; ) {
// If codePointAt returned undefined here, we would have already exited the loop
if (input.codePointAt(i)! <= 65535) {
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Hi @tats-u Thanks for working on this. Let's continue.
|
There was a problem hiding this comment.
All reported issues were addressed across 6 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
|
@tats-u Hi. Thank you very much. LGTM, I'll send this PR to Fabian for merge. Please finalize the comments from the AI code review. UPD: |
There was a problem hiding this comment.
All reported issues were addressed across 8 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 6 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
Fixes #875
Implemented based on graphemes validation.
Summary by CodeRabbit
codePoints,minCodePoints,maxCodePoints, andnotCodePoints._getCodePointCount._getCodePointCount.