-
Notifications
You must be signed in to change notification settings - Fork 130
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
Make generated files // swift-format-ignore #738
Comments
Sounds good. Are we happy for it to be behind a config option for those that do want to include the generated files in their format? |
This is probably the better solution although we could have something in the meanwhile. |
I agree that swift-format would benefit from ignore support in its own config file. You’re right that the reusable GitHub workflows have support for this already, but I don’t think we can expect that all adopters use these. @weissi presumably you don’t use the reusable script since you filed the issue? |
Correct, not using those. I'm fine with a configuration option to turn on/off |
That'd be fine with me, I'd just make sure it's not tied to swift-format. Maybe a "top-level-comments" property, then users can specify "swift-format-ignore". |
@MahdiBM wrote:
I'm less inclined to make this super generalisable. Seems like an odd thing for folks to be inserting arbitrary things at the top of the generated file and, while I would be sympathetic to not wanting to over-index on one tool if we had an ecosystem of tens of linters, Sounds like @FranzBusch agrees (#738 (comment)) and if Swift Protobuf is doing this, then I'm inclined for us to. What do others think. I know I originally suggested we make this configurable but maybe we should just add the comment(s) unilaterally? Any objections? |
Description
I have generated files & swift-format. I don't want the formatter to reformat the generated code though. So it'd be awesome if it could generate a line with
// swift-format-ignore
which will disable formatting for that file.Reproduction
N/a
Package version(s)
All
Expected behavior
No formatting
Environment
All
Additional information
No response
The text was updated successfully, but these errors were encountered: