You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: swift-lang/src/main/resources/swiftlint-rules.json
+55Lines changed: 55 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2352,5 +2352,60 @@
2352
2352
"offset": "5min",
2353
2353
"function": "CONSTANT_ISSUE"
2354
2354
}
2355
+
},
2356
+
{
2357
+
"key": "accessibility_trait_for_button",
2358
+
"name": "Accessibility Trait for Button",
2359
+
"description": "All views with tap gestures added should include the .isButton accessibility trait. If a tap opens an external link the .isLink trait should be used instead.",
2360
+
"severity": "MINOR",
2361
+
"type": "CODE_SMELL",
2362
+
"debt": {
2363
+
"offset": "5min",
2364
+
"function": "CONSTANT_ISSUE"
2365
+
}
2366
+
},
2367
+
{
2368
+
"key": "no_magic_numbers",
2369
+
"name": "No Magic Numbers",
2370
+
"description": "Magic numbers should be replaced by named constants.",
2371
+
"severity": "MINOR",
2372
+
"type": "CODE_SMELL",
2373
+
"debt": {
2374
+
"offset": "5min",
2375
+
"function": "CONSTANT_ISSUE"
2376
+
}
2377
+
},
2378
+
{
2379
+
"key": "ns_number_init_as_function_reference",
2380
+
"name": "NSNumber Init as Function Reference",
2381
+
"description": "Passing `NSNumber.init` or `NSDecimalNumber.init` as a function reference is dangerous as it can cause the wrong initializer to be used, causing crashes. Use `.init(value:)` instead.",
2382
+
"severity": "MAJOR",
2383
+
"type": "BUG",
2384
+
"debt": {
2385
+
"offset": "5min",
2386
+
"function": "CONSTANT_ISSUE"
2387
+
}
2388
+
},
2389
+
{
2390
+
"key": "self_binding",
2391
+
"name": "Self Binding",
2392
+
"description": "Re-bind `self` to a consistent identifier name.",
2393
+
"severity": "MINOR",
2394
+
"type": "CODE_SMELL",
2395
+
"debt": {
2396
+
"offset": "5min",
2397
+
"function": "CONSTANT_ISSUE"
2398
+
}
2399
+
},
2400
+
{
2401
+
"key": "shorthand_optional_binding",
2402
+
"name": "Shorthand Optional Binding",
2403
+
"description": "Use shorthand syntax for optional binding",
0 commit comments