Skip to content

Conversation

dnadoba
Copy link
Collaborator

@dnadoba dnadoba commented Nov 25, 2021

Motivation

We do not want code indention for compile-time conditions because will have a lot of them if we add async/await support.
Literally all new code for async/await needs to be behind #if compiler(>=5.5) which would indent all code by 4 spaces.

Changes

  • set --ifdef to no-indent and run SwiftFormat
  • update generate_linux_tests.rb to use the new indention rule as well

Copy link
Collaborator

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good modulo sanity check failing.

@dnadoba
Copy link
Collaborator Author

dnadoba commented Nov 25, 2021

Looks good modulo sanity check failing.

Ah yeah. I needed to update generate_linux_tests.rb to use the new indention rule too.

@dnadoba dnadoba merged commit 9eaecbb into swift-server:main Nov 25, 2021
@dnadoba dnadoba deleted the dn-ifdef-no-indent branch November 25, 2021 16:09
@fabianfett fabianfett added the 🔨 semver/patch No public API change. label Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants