Fix function assignment formatting and unify formatter paths - #8611
Conversation
Signed-off-by: Christoph Knittel <ck@cca.io>
Signed-off-by: Christoph Knittel <ck@cca.io>
Signed-off-by: Christoph Knittel <ck@cca.io>
Signed-off-by: Christoph Knittel <ck@cca.io>
Signed-off-by: Christoph Knittel <ck@cca.io>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Signed-off-by: Christoph Knittel <ck@cca.io>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 05d61c73ed
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Christoph Knittel <ck@cca.io>
Signed-off-by: Christoph Knittel <ck@cca.io>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8611 +/- ##
==========================================
- Coverage 77.32% 77.32% -0.01%
==========================================
Files 467 467
Lines 63342 63313 -29
==========================================
- Hits 48982 48957 -25
+ Misses 14360 14356 -4
🚀 New features to boost your workflow:
|
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-8611 |
| let make = | ||
| @directive("'use memo'") | ||
| (~count, ~username=?) => { | ||
| @directive("'use memo'") (~count, ~username=?) => { |
| asyncIterableForAwaitLoopControlValues := [ | ||
| ...asyncIterableForAwaitLoopControlValues.contents, | ||
| value, | ||
| ] |
There was a problem hiding this comment.
This is arguably more readable, but it also indicates this PR will possibly yield lots of changes in production codebases.
There was a problem hiding this comment.
Didn't see a single one in one of our quite large codebases.
And I think the unification is worth it!
| 223 * accu.contents + String.codePointAt(s, i)->Option.getUnsafe, | ||
| Int.shiftLeft(1, 31) - 1, | ||
| ) | ||
| accu := Int.bitwiseAnd( |
Fixes #8049.
Function assignments using
:=now avoid unnecessary parentheses and indentation, and attributes stay beside function parameters.Share assignment layout across refs, record fields, and object fields, fixing excess indentation for records and arrays while preserving explicit braces. Consolidate standalone and callback function printing so callbacks retain function return-type parentheses and format JSX fragments consistently. Remove obsolete helpers and unused parameters.
Validation: