-
Notifications
You must be signed in to change notification settings - Fork 440
Format codegen files #1301
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
Format codegen files #1301
Conversation
This should be coordinated with some of the other PR's before merge |
I deliberately decided not to format the generated files because it simplifies development: If you make changes to If we want to format those files (which I think is a good idea), IMO the formatting should be done in |
I don't format the generated files, but the code generation project 😅 Like template files etc. |
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.
Oh, I should have looked at the PR more closely, sorry. CodeGeneration
itself should certainly be formatted by swift-format
. Thanks for catching and fixing this. I wonder whether we can generalize this a little further to also include the examples (see inline comment).
ea81280
to
4f2ab61
Compare
I tried to include all relevant files as you sugested. |
4f2ab61
to
69f1525
Compare
69f1525
to
021131a
Compare
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.
Thanks for catching that we didn’t format all of these files and fixing it.
# Don't format .build folder and content | ||
files_to_exclude.update(package_dir.glob('**/.build/**/*.swift')) | ||
# Don't format test input files | ||
files_to_exclude.update(package_dir.glob('**/Inputs/**/*.swift')) |
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.
This looks really nice 😍
@swift-ci plese test |
@swift-ci please test |
Codegen was not formatted. IMO we should do that to keep the code consistent