Draft
Conversation
calda
commented
Mar 22, 2026
| - Best practices without autocorrect or linting are still welcomed as general advice for humans and [AI agents](https://swift.airbnb.tech/skill). | ||
| - We strive to align with best practices of the broader [Swift community](https://forums.swift.org). | ||
| - This guide is in addition to the official [Swift API Design Guidelines](https://swift.org/documentation/api-design-guidelines/). These rules should not contradict that document. | ||
| - These rules should not fight Xcode's <kbd>^</kbd> + <kbd>I</kbd> indentation behavior. |
Member
Author
There was a problem hiding this comment.
We have not prioritized this in several years.
- Xcode indentation is a moving target
- In some areas we disagree with the default indentation behavior, with reasonable justification
- We address this internally with a custom Xcode extension that replaces the default
^Ifunctionality
calda
commented
Mar 22, 2026
| - We strive to align with best practices of the broader [Swift community](https://forums.swift.org). | ||
| - This guide is in addition to the official [Swift API Design Guidelines](https://swift.org/documentation/api-design-guidelines/). These rules should not contradict that document. | ||
| - These rules should not fight Xcode's <kbd>^</kbd> + <kbd>I</kbd> indentation behavior. | ||
| - We strive to make every rule lintable: |
Member
Author
There was a problem hiding this comment.
We generally prefer code autocorrect over linting, and now welcome rules with no autocorrect / linting component (e.g. for the AI skill).
calda
commented
Mar 22, 2026
|
|
||
| </details> | ||
|
|
||
| ## AI Skill |
Member
Author
There was a problem hiding this comment.
Still need to ensure this is excluded from generated site content
calda
commented
Mar 22, 2026
|
|
||
| Following this style guide should: | ||
|
|
||
| - Make it easier to read and begin understanding unfamiliar code. |
Member
Author
There was a problem hiding this comment.
Thought this could be simplified
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR proposes updates to our guiding tenets.