The Google style guide shows the where clause in a multi-line class declaration to be indented at the same level as the class itself. However, in the following example I've noticed that it's not the case.
Test example:
class MyContainer<BaseCollection>:
MyContainerSuperclass,
MyContainerProtocol
where BaseCollection: Collection {
doSomething()
}
Command run:
$ Pods/SwiftFormat/CommandLineTool/swiftformat test.swift --rules indent --indent 4
I'd expect the output to remain the same as the input. Instead, it gives me the following:
class MyContainer<BaseCollection>:
MyContainerSuperclass,
MyContainerProtocol
where BaseCollection: Collection {
doSomething()
}
Is this a bug or should I be incorporating a separate rule in conjunction with indent to prevent this?
@meherkasam following the Google style guide is not a specific goal of this project. I do try to accommodate all reasonable styles, and this seems like a reasonable rule, so I'll consider it as a feature request.
Most helpful comment
@meherkasam following the Google style guide is not a specific goal of this project. I do try to accommodate all reasonable styles, and this seems like a reasonable rule, so I'll consider it as a feature request.