-
-
Notifications
You must be signed in to change notification settings - Fork 511
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(biome_grit_formatter): initial infrastructure #2837
feat(biome_grit_formatter): initial infrastructure #2837
Conversation
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.
The code generator created src/js
, do we need to keep this or can it be removed?
This isn't correct. You have to update the codegen here: biome/xtask/codegen/src/formatter.rs Lines 785 to 786 in 7095ed0
|
It's possible you'll have to update this too: biome/xtask/codegen/src/formatter.rs Lines 553 to 559 in 7095ed0
|
…`just gen-format`.
@ematipico Thank you for the feedback, as always! I think I understand it a bit better now, although I am still a bit unclear on how the GritQL nodes are best categorized. I'll re-iterate again soon. |
I'm not sure if covering all of these should be in the scope of this PR. (From the original issue)
Additionally, I noticed that #1207 also added some additions like:
|
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.
Great start!
xtask/codegen/src/formatter.rs
Outdated
_ if name.contains("Operation") || name.contains("Pattern") => NodeConcept::Pattern, | ||
_ if name.contains("Predicate") => NodeConcept::Predicate, | ||
_ if name.ends_with("Definition") => NodeConcept::Declaration, | ||
_ if matches!(name, "CodeSnippet") || name.ends_with("Literal") => { |
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.
I would've used name == "CodeSnippet"
here ;)
No, I think I'll just merge as is (if the remaining tests are green), and you can add options like this in follow-up PRs. That will allow us to iterate a bit faster, and you'll have to worry less about merge issues. |
There just seems to be an issue with an unused dependency still. |
CodSpeed Performance ReportMerging #2837 will not alter performanceComparing Summary
|
Summary
Set up the basic infrastructure required for further work on #2476
Implementation
just new-crate biome_grit_formatter
Cargo.toml
with relevant settingsxtask/codegen/src/formatter
just gen-formatter
Test Plan
Cross comparison with other Biome formatters.