Comments (2)
It's based on an interpretation of Apple's guidelines, which aren't always entirely self-consistent.
I don't currently add a space before a var inside a class or struct, but I do add it before a function or nested class, or between classes and functions at the same scope. So my rules would not add spaces inside Apple's Resolution and VideoMode classes like they have in your UIColor extension.
FWIW, I'm not 100% happy with that rule either though, so I'm happy to take feedback about alternative ways that it could work.
from swiftformat.
Oh, I see now, it's related to extensions, seems like this doesn't apply to class and struct. Thanks for your feedback!
from swiftformat.
Related Issues (20)
- `redundantSelf` causes an unnecessary warning when a closure has specified an actor and uses a name of a property for parameter HOT 1
- Swiftformat not working from the docker image HOT 2
- Unexpected false-positive in unusedArguments rule HOT 2
- Format only uncommited(modifications) if are available HOT 6
- `preferForLoop` doesn't deal well with `try` and `await` HOT 1
- `preferForLoop` picks `cas` identifier for `allCases` items HOT 1
- Formatting a SwiftUI view modifier surrounded by #if/#endif has extra indentation
- Can swiftformat align && operators in multi-line Equatable implementations like Xcode format?
- Rule Idea: Prefer Color/ImageResource over 'named' Initialisers
- `enumNamespaces` applies even to types with macros attached HOT 4
- Missing version 0.53.2
- redundanttype rule is not smart enough HOT 1
- Option idea for rule `wrapMultilineConditionalAssignment`
- Hoist try error with multi line string HOT 1
- Lots of issues with `nonisolated(unsafe)` HOT 5
- Universal build fails with `error: duplicate key found: '<ResolvedTarget: CommandLineTool>'`
- Capture Lists and `--wrapcollections` HOT 3
- hoistAwait misbehaves in async auto closures HOT 2
- SwiftFormat creating incorrect SwiftData code: "A default value requires a fully qualified domain named value" HOT 3
- `blankLineAfterImports` rule works incorrectly with `internal` and `private` keywords HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftformat.