Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since the DStyle proposal to indent continuation lines by two tabs instead of
one was rejected (see dlang/dlang.org#2766), and it is
the only behaviour dfmt supports, I suggest to add an option to indent
everything with a single tab. So the option changes the indentation inside the
parens.
Double indentation is useful to visually emphasize a code block after an
argument list or if-, while-conditions and so on. For example
vs
The indentation in the second case makes it clear where the condition ends.
Some style guides enforce:
In the case of a such style guide, the problem disappears because there is
always a new line between the condition and the code block:
It also eliminates the need to think about aligning the code with mixed parens,
brackets and braces (e.g.
([])
), just indent everything with one tab.