Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'implicit_self' rule #3140

Closed
wants to merge 1 commit into from
Closed

Add 'implicit_self' rule #3140

wants to merge 1 commit into from

Conversation

msbm
Copy link

@msbm msbm commented Mar 9, 2020

#59

@SwiftLintBot
Copy link

7882 Warnings
⚠️ Big PR
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/AerialVideo.swift:211:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/AerialVideo.swift:214:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/AerialVideo.swift:229:12: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/AerialVideo.swift:230:47: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/AerialVideo.swift:232:17: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/AerialVideo.swift:231:42: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/AerialVideo.swift:235:17: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/AerialVideo.swift:234:55: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/AerialVideo.swift:246:25: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/VideoManager.swift:177:20: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/VideoManager.swift:182:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/VideoManager.swift:178:13: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/VideoManager.swift:180:47: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/VideoDownload.swift:147:31: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/VideoDownload.swift:165:12: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/VideoDownload.swift:175:13: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/VideoDownload.swift:173:17: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Hardware/DisplayDetection.swift:28:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Hardware/DisplayDetection.swift:30:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Hardware/DisplayDetection.swift:37:23: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Hardware/DisplayDetection.swift:37:41: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Hardware/DisplayDetection.swift:37:63: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Hardware/DisplayDetection.swift:37:95: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Hardware/DisplayDetection.swift:37:135: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Hardware/DisplayDetection.swift:37:166: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Hardware/DisplayDetection.swift:37:201: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/CustomVideoFolders.swift:53:33: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/CustomVideoFolders.swift:112:33: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/CustomVideoFolders.swift:181:33: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/PoiStringProvider.swift:80:13: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/PoiStringProvider.swift:81:13: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Cache/PoiStringProvider.swift:77:17: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/AutoUpdates.swift:143:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/AutoUpdates.swift:139:13: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/ErrorLog.swift:26:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Controllers/PWC Tabs/PWC+Cache.swift:110:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Controllers/PWC Tabs/PWC+Cache.swift:111:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Time/Solar.swift:230:27: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/Time/Solar.swift:276:27: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Controllers/PWC Tabs/PWC+Updates.swift:138:54: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/ManifestLoader.swift:700:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/ManifestLoader.swift:704:25: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/ManifestLoader.swift:707:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Models/ManifestLoader.swift:705:22: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:17:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:22:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:25:23: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:19:25: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:26:21: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:43:65: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:66:60: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:76:20: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:81:20: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:85:20: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:89:21: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:90:21: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:99:25: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView+Player.swift:125:33: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoTableSource.swift:74:46: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoTableSource.swift:117:32: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoTableSource.swift:117:63: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoTableSource.swift:126:51: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoTableSource.swift:127:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoTableSource.swift:127:21: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoTableSource.swift:133:18: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoTableSource.swift:140:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/PrefPanel/InfoTableSource.swift:141:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Controllers/PreferencesWindowController.swift:244:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Controllers/PreferencesWindowController.swift:251:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Controllers/PreferencesWindowController.swift:274:33: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Controllers/CustomVideoController.swift:64:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Controllers/CustomVideoController.swift:92:37: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Controllers/CustomVideoController.swift:164:13: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Controllers/CustomVideoController.swift:472:33: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Controllers/CustomVideoController.swift:547:30: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/ClockLayer.swift:30:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/ClockLayer.swift:40:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/ClockLayer.swift:38:10: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/ClockLayer.swift:38:21: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/ClockLayer.swift:56:33: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/UpdatesLayer.swift:30:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/UpdatesLayer.swift:40:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/UpdatesLayer.swift:38:10: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/UpdatesLayer.swift:38:21: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/UpdatesLayer.swift:58:33: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/BatteryLayer.swift:30:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/BatteryLayer.swift:40:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/BatteryLayer.swift:38:10: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/BatteryLayer.swift:38:21: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/BatteryLayer.swift:56:33: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/MessageLayer.swift:29:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/MessageLayer.swift:39:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/MessageLayer.swift:37:10: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/MessageLayer.swift:37:21: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/MessageLayer.swift:49:33: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/LocationLayer.swift:36:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/LocationLayer.swift:34:10: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/LocationLayer.swift:34:21: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/LocationLayer.swift:108:32: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/LocationLayer.swift:109:37: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/CountdownLayer.swift:30:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/CountdownLayer.swift:40:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/CountdownLayer.swift:38:10: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/CountdownLayer.swift:38:21: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/CountdownLayer.swift:57:37: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Controllers/PWC Tabs/PWC+Videos.swift:708:19: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Controllers/PWC Tabs/PWC+Videos.swift:710:23: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/PrefPanel/DisplayView.swift:256:21: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/AnimationLayer.swift:40:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/AnimationLayer.swift:42:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/AnimationLayer.swift:47:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/AnimationLayer.swift:49:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/AnimationLayer.swift:50:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/AnimationLayer.swift:51:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/AnimationLayer.swift:52:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/AnimationLayer.swift:55:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/AnimationLayer.swift:70:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/Layers/AnimationLayer.swift:199:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView.swift:118:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView.swift:119:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView.swift:126:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView.swift:131:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView.swift:138:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView.swift:141:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView.swift:142:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView.swift:145:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView.swift:146:9: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView.swift:153:21: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView.swift:178:25: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ This PR introduced a violation in Aerial: /Aerial/Source/Views/AerialView.swift:178:90: warning: Implicit Self Violation: Instance variables and methods should not be accessed with 'self.' unless necessary. (implicit_self)
⚠️ Danger found 7882 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 131.
12 Messages
📖 Linting Aerial with this PR took 1.38s vs 1.25s on master (10% slower)
📖 Linting Alamofire with this PR took 3.1s vs 2.14s on master (44% slower)
📖 Linting Firefox with this PR took 10.66s vs 8.85s on master (20% slower)
📖 Linting Kickstarter with this PR took 17.69s vs 13.81s on master (28% slower)
📖 Linting Moya with this PR took 1.47s vs 1.26s on master (16% slower)
📖 Linting Nimble with this PR took 1.4s vs 1.35s on master (3% slower)
📖 Linting Quick with this PR took 0.54s vs 0.53s on master (1% slower)
📖 Linting Realm with this PR took 2.74s vs 2.34s on master (17% slower)
📖 Linting SourceKitten with this PR took 1.09s vs 1.0s on master (9% slower)
📖 Linting Sourcery with this PR took 7.45s vs 6.7s on master (11% slower)
📖 Linting Swift with this PR took 17.24s vs 12.36s on master (39% slower)
📖 Linting WordPress with this PR took 16.94s vs 14.94s on master (13% slower)

Generated by 🚫 Danger

@svenmuennich
Copy link
Contributor

I love how this is implemented without using AnalyzerRule, which this rule's counterpart explicit_self is build on, since those rules are quite slow in large code bases.

Having that said, I wonder if we can unify these two rules into a single one and just make it configurable with a mode:

  • always: The original behavior of explicit_self. This would be the default to not break existing configurations.
  • never: Equivalent to the proposed implicit_self rule configured with initSelfUsage: never.
  • never_except_initializer: Equivalent to the proposed implicit_self rule configured with initSelfUsage: always.
  • never_except_initializer_before_init_call: Equivalent to the proposed implicit_self rule configured with initSelfUsage: before_init_call.

The implementation would be based on your PR of course, to get the performance boost from dropping AnalyzerRule.

What do you think @msbm ?

@msbm
Copy link
Author

msbm commented May 26, 2020

Yeah I think that makes total sense, given explicit_self and implicit_self are mutually exclusive. I will merge them into one rule as explicit_self so the new rule is backwards compatible

@svenmuennich
Copy link
Contributor

@msbm Did you get a chance to work on this? If not, I might find some time on the weekend to give it a shot.

@msbm
Copy link
Author

msbm commented Jun 5, 2020

Yeah I've been (slowly, sorry) working on it. I think I'm pretty close so I'll set aside some time this weekend to finish it up and update the PR

@msbm
Copy link
Author

msbm commented Jun 8, 2020

@svenmuennich After working on this more this weekend I'm realizing i don't think it'll actually be possible to simplify ExplicitSelf using this logic. For ImplicitSelf I'm looking at every identifier and asserting that it isn't preceded with self. unless it's being shadowed. Sadly, ExplicitSelf isn't the opposite of 'nothing preceded with self'. I thought I could work some other logic to do Explicit self in a similar way by looking at all the definitions of instance vars and methods and seeing if they are reused (and this worked for the existing ExplicitSelf test cases), however it won't work in the subclassing case as far as I can figure.

@ricardorauber-poatek
Copy link

Hi, any news on this? Thanks!

@svenmuennich
Copy link
Contributor

Sorry @msbm, I somehow missed the notification when you commented again 😞

Sadly, ExplicitSelf isn't the opposite of 'nothing preceded with self'.

This is indeed correct. I missed that when initially looking over this PR. So we probably have to stick to having two methods explicit_self and implicit_self.

Thank you for putting in the time trying to work this out though 👏

Comment on lines +22 to +24
* Added 'implicit_self' opt-in rule.
[msbm](https://github.com/msbm)
[#59](https://github.com/realm/SwiftLint/issues/59)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Added 'implicit_self' opt-in rule.
[msbm](https://github.com/msbm)
[#59](https://github.com/realm/SwiftLint/issues/59)
* Added 'implicit_self' opt-in rule.
[msbm](https://github.com/msbm)
[#59](https://github.com/realm/SwiftLint/issues/59)

return nil
}

let selfOffset = identifier.offset - 5
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this work when self is placed on a different line than the identifier? E.g.:

self
    .someMethodCall()

We should probably add a test case for this either way.

Comment on lines +46 to +47
if configuration.initSelfUsage == .beforeInitCall &&
structure.isInit &&
Copy link
Contributor

Choose a reason for hiding this comment

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

These two conditions are constant for all elements of structure.identifiers (i.e. identifier) and both are reused below for determining subViolations. It might be worth extracting this into a variable.

let kind: String
let offset: ByteCount

init?(token: SwiftLintSyntaxToken, file: SwiftLintFile) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this an optional initializer? Should we maybe return nil if name and/or kind would otherwise be initialized with a fallback value of ""?

}

private var enclosedParameters: [Identifier] {
return substructure.flatMap { structure -> [Identifier] in
Copy link
Contributor

Choose a reason for hiding this comment

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

A compactMap seems to fit better here.

@jpsim
Copy link
Collaborator

jpsim commented Nov 8, 2020

I don't think it's possible to write this reliably without access to the post-typechecked AST (aka AnalyzerRule).

The SwiftLint codebase itself uses an implicit self style, so I tried turning this on for this project and got ~80 violations, most of which are false positives.

@stale
Copy link

stale bot commented Jan 7, 2021

This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions!

@stale stale bot added the wontfix label Jan 7, 2021
@stale stale bot closed this Jan 14, 2021
@DanielKrofchick
Copy link

Are there any plans to implement this lint rule?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants