Open Pispa339 opened 1 month ago
Synced to Apple’s issue tracker as rdar://136754857
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