Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt consecutiveSpaces rule #125

Merged
merged 4 commits into from May 21, 2021
Merged

Conversation

calda
Copy link
Member

@calda calda commented May 12, 2021

Summary

This PR adopts SwiftFormat's consecutiveSpaces rule, piggybacking on top of the existing limit-vertical-whitespace rule

Limit consecutive whitespace to one blank line or space (excluding indentation). Favor the following formatting guidelines over whitespace of varying heights to divide files into logical groupings.

// WRONG
struct Planet {

  let mass:          Double
  let hasAtmosphere: Bool


  func travelTo() { }

}

// RIGHT
struct Planet {

  let mass: Double
  let hasAtmosphere: Bool

  func travelTo() { }

}

Reasoning

This aligns with the style folks are currently using, based on my experience. Linting for this will prevent folks from unintentionally introducing stray whitespace.

Please react with 馃憤/馃憥 if you agree or disagree with this proposal.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
calda and others added 2 commits May 13, 2021 10:55
Co-authored-by: Michael Bachand <bachand.michael@gmail.com>
@calda calda merged commit ffe5acd into airbnb:master May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants