-
Notifications
You must be signed in to change notification settings - Fork 239
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
Ability To Turn Off Formatting For Subdirectory #870
Comments
See also this thread |
Synced to Apple’s issue tracker as rdar://139269456 |
Have added an untested implementation at #873. |
#873 now tested locally and submitted for review. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a
.swift-format
file at the root of my repo, but some third-party code in a sub-directory. I'd like to be able to disable formatting for the subdirectory.There are a couple of ways that this could be accomplished
.swift-format
with a pattern or patterns for paths to be excluded from formatting.no-swift-format
and disabling formatting anywhere below that file in the treeThe former case is useful, but would not be sufficient in the situation where you've a submodule with some third-party code, and that submodule has its own
.swift-format
file. In that situation the module's file would take precedence as it is closest, but you'd want to be able to override it locally without having to make changes to it.Detecting a
.no-swift-format
file at the same level would be efficient in this situation, and the file could be added to.gitignore
for the module, so that creating it locally would not cause upstream problems.The text was updated successfully, but these errors were encountered: