-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
Add custom formatters #1733
Add custom formatters #1733
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1733 +/- ##
=======================================
Coverage ? 99.05%
=======================================
Files ? 37
Lines ? 4110
Branches ? 954
=======================================
Hits ? 4071
Misses ? 25
Partials ? 14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
CodSpeed Performance ReportMerging #1733 will not alter performanceComparing Summary
|
@denisart This PR provides a flexible way to pass the formatter. I expect the CLI arguments will be added in the future.
|
I agree with the ruff as default (if user not specified formatters). Do you want to work on this PR or as part of a new PR? |
Thank you for asking. This project is used by many projects. I want to avoid breaking changes in the short term. (including adding dependency ) |
I agree with you. So i added |
@koxudaxi |
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.
LGTM.
Hooks in other libs: https://the-guild.dev/graphql/codegen/docs/config-reference/lifecycle-hooks
it is beta version of custom code formatters. it is simple realization without lifecycle hooks. Only before code generation
See
docs/custom-formatters.md
for simple usage example. And seetest_format.py
for development examples.What do you think about this idea?