You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The existing rule NoEmptyLinesOpeningClosingBraces is somewhat too much of a catch-all rule. I'd like to request a more fine-grained rule where empty lines on opening or closing braces would be disallowed for methods, but allowed for type declarations.
For example the following would be disallowed within the rule
func hello() {
// code starts here
whereas the following would be allowed
class SomeClass {
// Code starts here
The text was updated successfully, but these errors were encountered:
These are the kinds of extremely fine-grained customizations that I'm really hesitant to add. NoEmptyLinesOpeningClosingBraces was added because it allows the formatter to be more opinionated across the board (which I think is a good goal). What would be the benefit of allowing the blank line for types but not functions?
This request stems mostly from this our team's preference and our desire to be able to configure the formatter to our liking. However, this also seems to be the formatting used in Apple's example projects like DiffableDataSourceSample for example.
I can definitely see why customization like this is not something one would consider worth pursuing given there's no real benefit beyond personal preference.
The existing rule
NoEmptyLinesOpeningClosingBraces
is somewhat too much of a catch-all rule. I'd like to request a more fine-grained rule where empty lines on opening or closing braces would be disallowed for methods, but allowed for type declarations.For example the following would be disallowed within the rule
whereas the following would be allowed
The text was updated successfully, but these errors were encountered: