Skip to content
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

Merged
merged 35 commits into from
Oct 8, 2024

Conversation

branberry
Copy link
Contributor

@branberry branberry commented Sep 26, 2024

Summary

Adds a basic formatting rule for the where pattern

#2455

Test Plan

Snapshot test demonstrates the intended formatting behavior.

@github-actions github-actions bot added A-Formatter Area: formatter L-Grit Language: GritQL labels Sep 26, 2024
@branberry branberry changed the title Update tests (WIP) Add formatting Sep 26, 2024
Copy link

codspeed-hq bot commented Sep 26, 2024

CodSpeed Performance Report

Merging #4095 will not alter performance

Comparing branberry:feat/like (834f340) with main (2f0d5c7)

Summary

✅ 105 untouched benchmarks

branberry and others added 18 commits September 26, 2024 10:02
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>
@github-actions github-actions bot added A-CLI Area: CLI A-Core Area: core A-Project Area: project A-Linter Area: linter L-JavaScript Language: JavaScript and super languages L-CSS Language: CSS labels Sep 30, 2024
@branberry branberry changed the title (WIP) Add formatting feat(format/grit): add basic formatting for where predicate Oct 5, 2024
@branberry branberry changed the title feat(format/grit): add basic formatting for where predicate feat(format/grit): add basic formatting for where pattern Oct 5, 2024
@branberry branberry marked this pull request as ready for review October 5, 2024 15:50
@github-actions github-actions bot added the A-Project Area: project label Oct 6, 2024
Comment on lines 13 to 22
match definition {
Ok(definition) => {
join.entry(
definition.syntax(),
&format_or_verbatim(definition.format()),
);
}
Err(_) => (),
}
}
Copy link
Member

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?;

Copy link
Contributor Author

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.

crates/biome_service/src/file_handlers/grit.rs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CLI Area: CLI A-Formatter Area: formatter A-Project Area: project L-Grit Language: GritQL L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants