-
-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(format/grit): add basic formatting for where pattern #4095
Conversation
CodSpeed Performance ReportMerging #4095 will not alter performanceComparing Summary
|
Co-authored-by: Emanuele Stoppa <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
….7.0 (biomejs#4129) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
… diagnostics (biomejs#4112) Co-authored-by: Emanuele Stoppa <[email protected]>
crates/biome_grit_formatter/tests/specs/grit/patterns/options.json
Outdated
Show resolved
Hide resolved
match definition { | ||
Ok(definition) => { | ||
join.entry( | ||
definition.syntax(), | ||
&format_or_verbatim(definition.format()), | ||
); | ||
} | ||
Err(_) => (), | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for using the match
. You can simply do
let definition = definition?;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this! Rust newbie here, so I appreciate this kind of input.
Summary
Adds a basic formatting rule for the
where
pattern#2455
Test Plan
Snapshot test demonstrates the intended formatting behavior.