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(formatter): implement formatting for GritQL root node #4128

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

arendjr
Copy link
Contributor

@arendjr arendjr commented Sep 30, 2024

Summary

Implements formatting for the GritQL root node. This helps to resolve the issue where the GritQL formatter trims the trailing newline, which caused the spec tests to panic. cc @branberry

Admittedly I'm not entirely sure why the default, verbatim node formatting strips the trailing newline. It creates some hard-to-debug behavior, so hopefully someone more familiar with our formatter infra has a suggestion how to resolve that.

Also added a quick_test.rs for the GritQL formatter, even though it didn't end up helping.

Test Plan

Test added.

@arendjr arendjr requested review from a team September 30, 2024 05:21
@github-actions github-actions bot added A-Formatter Area: formatter L-Grit Language: GritQL labels Sep 30, 2024
Copy link

codspeed-hq bot commented Sep 30, 2024

CodSpeed Performance Report

Merging #4128 will improve performances by 6.77%

Comparing arendjr:gritql-root-node-formatting (059640a) with main (011a709)

Summary

⚡ 1 improvements
✅ 106 untouched benchmarks

Benchmarks breakdown

Benchmark main arendjr:gritql-root-node-formatting Change
db_17847247775464589309.json[cached] 13.6 ms 12.8 ms +6.77%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Formatter Area: formatter L-Grit Language: GritQL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants