syntactic_sugar - ApplebaumIan/BitbucketAPI GitHub Wiki
Shorthand syntactic sugar should be used, i.e. [Int] instead of Array.
- Identifier: syntactic_sugar
- Enabled by default: Enabled
- Supports autocorrection: Yes
- Kind: idiomatic
- Analyzer rule: No
- Minimum Swift compiler version: 3.0.0
- Default configuration: warning
let x: [Int]let x: [Int: String]let x: Int?func x(a: [Int], b: Int) -> [Int: Any]let x: Int!extension Array {
func x() { }
}extension Dictionary {
func x() { }
}let x: CustomArray<String>var currentIndex: Array<OnboardingPage>.Index?func x(a: [Int], b: Int) -> Array<Int>.IndexunsafeBitCast(nonOptionalT, to: Optional<T>.self)type is Optional<String>.Typelet x: Foo.Optional<String>let x: ↓Array<String>let x: ↓Dictionary<Int, String>let x: ↓Optional<Int>let x: ↓ImplicitlyUnwrappedOptional<Int>func x(a: ↓Array<Int>, b: Int) -> [Int: Any]func x(a: [Int], b: Int) -> ↓Dictionary<Int, String>func x(a: ↓Array<Int>, b: Int) -> ↓Dictionary<Int, String>let x = ↓Array<String>.array(of: object)let x: ↓Swift.Optional<String>