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

Fix ExplicitTypeInterfaceRule in groups and statements #2588

Conversation

dirtydanee
Copy link
Contributor

First of all, thanks for all the efforts on the project! In this PR I am attempting to fix #2154

Main changes to the original rule's implementation:

  • Added checks if a given declaration kind:

    • is not in a for or forEach statement
    • is not in a case statement
    • is not wrapped in a tuple
    • is not in a capture group - had to use regex, I could not find other way to figure it out from the parent structure
  • Moved functions to an extension on Dictionary

  • Added test cases covering the new implementation to ExplicitTypeInterfaceRuleTests.swift

@jpsim
Copy link
Collaborator

jpsim commented Jan 24, 2019

This looks good to me, thanks for re-filing the PR, it was easier to review and understand. Let's merge once CI is happy unless @marcelofabri or other maintainers have feedback.

}

var caseExpressionRanges: [NSRange] {
return ranges(with: "source.lang.swift.expr.tuple", for: "source.lang.swift.structure.elem.expr")
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick: the tuple kind should be defined in SwiftExpressionKind

@@ -64,4 +64,153 @@ class ExplicitTypeInterfaceRuleTests: XCTestCase {

verifyRule(description, ruleConfiguration: ["allow_redundancy": true])
}

func testEmbededInStatements() {
let nonTriggeringExamples = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

it there a reason to not define all the examples in the rule description?

Copy link
Contributor Author

@dirtydanee dirtydanee Jan 24, 2019

Choose a reason for hiding this comment

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

I have considered them to be edge cases, and hid them from the rule's description.

Also, the testSwitchCaseDeclarations tests are only running above Swift 4.1. If I would move them to the default place, I must increase the base version of the rule to 4.1.

Shall I move it to the rule's description though?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sounds good to me 👍

@marcelofabri
Copy link
Collaborator

Thanks for fixing this, @dirtydanee! Just had two minor comments.

@SwiftLintBot
Copy link

SwiftLintBot commented Jan 24, 2019

9064 Messages
📖 Linting Aerial with this PR took 1.9s vs 1.86s on master (2% slower)
📖 Linting Alamofire with this PR took 3.93s vs 3.48s on master (12% slower)
📖 Linting Firefox with this PR took 13.94s vs 12.7s on master (9% slower)
📖 Linting Kickstarter with this PR took 22.57s vs 20.29s on master (11% slower)
📖 Linting Moya with this PR took 2.14s vs 1.88s on master (13% slower)
📖 Linting Nimble with this PR took 2.25s vs 1.91s on master (17% slower)
📖 Linting Quick with this PR took 0.63s vs 0.57s on master (10% slower)
📖 Linting Realm with this PR took 3.74s vs 3.34s on master (11% slower)
📖 Linting SourceKitten with this PR took 1.33s vs 1.17s on master (13% slower)
📖 Linting Sourcery with this PR took 5.11s vs 4.62s on master (10% slower)
📖 Linting Swift with this PR took 29.17s vs 26.11s on master (11% slower)
📖 Linting WordPress with this PR took 23.4s vs 19.88s on master (17% slower)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/AssetLoaderDelegate.swift:61:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/PoiStringProvider.swift:102:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/PoiStringProvider.swift:105:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/PoiStringProvider.swift:190:23: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/PoiStringProvider.swift:196:17: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:90:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:107:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:140:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:178:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:211:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:220:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:233:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:255:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:275:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:284:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:305:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:65:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:83:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:123:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:147:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:159:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:194:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:214:27: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:225:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:234:23: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:247:23: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:252:23: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:295:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:300:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:61:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:100:23: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:182:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:186:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:191:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:196:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:229:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:234:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/Preferences.swift:123:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoManager.swift:84:17: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoManager.swift:104:17: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Cache/VideoManager.swift:130:17: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ErrorLog.swift:43:17: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/Solar.swift:102:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/Solar.swift:107:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/Solar.swift:222:17: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/Solar.swift:223:17: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/TimeManagement.swift:87:23: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/TimeManagement.swift:91:23: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/TimeManagement.swift:166:31: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/TimeManagement.swift:166:61: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/TimeManagement.swift:172:31: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/TimeManagement.swift:172:67: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/TimeManagement.swift:178:31: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/TimeManagement.swift:178:66: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/TimeManagement.swift:184:31: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/TimeManagement.swift:184:69: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/TimeManagement.swift:190:31: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/TimeManagement.swift:190:73: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/Time/TimeManagement.swift:273:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:42:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:150:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:228:17: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:303:21: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:346:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:562:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:576:23: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:583:17: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:645:21: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:729:14: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:729:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:730:17: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:736:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:760:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:774:17: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:776:21: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:851:17: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:853:21: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:926:17: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:928:21: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:953:29: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:132:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:140:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:164:21: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:269:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:317:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:461:21: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:506:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:524:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:547:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:609:21: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Views/AerialView.swift:655:25: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:594:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1133:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1138:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1252:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1276:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1458:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1462:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1479:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1483:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1500:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1505:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1520:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1521:17: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1526:17: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1535:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1539:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1579:13: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1619:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1622:18: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1624:18: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1654:19: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1657:18: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1667:18: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1678:18: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1680:18: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1709:18: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1715:18: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
📖 This PR fixed a violation in Aerial: /Users/vsts/agent/2.144.2/work/1/s/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:1743:18: warning: Explicit Type Interface Violation: Properties should have a type interface (explicit_type_interface)
⚠️ Danger found 9064 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 131.

Generated by 🚫 Danger

@dirtydanee dirtydanee force-pushed the bugfix/explicit-type-interface-in-groups-and-stmts branch from 1b881ae to 4634467 Compare January 24, 2019 19:38
@marcelofabri
Copy link
Collaborator

Huh, I wonder if the regressions reported by oss-check are real. @dirtydanee can you run it locally to double check?

@dirtydanee
Copy link
Contributor Author

dirtydanee commented Jan 24, 2019

@marcelofabri On the 1b881ae commit CI has failed with these logs, but on my initial commit and after squashing 1b881ae, everything seems fine again.

I get errors locally constantly, when running swift test. I have initially thought that it could be something with outdated dependencies and tried to investigate what could be the problem, but I could not figure it out. Do you guys give me maybe a hint how could I resolve the issue locally?

@marcelofabri
Copy link
Collaborator

@dirtydanee I was talking about the times reported by oss-check (the build itself seem fine).

You can run it by using ./script/oss-check. It will take a few minutes because it checkouts all the repos we use for benchmark, compile SwiftLint from the current branch and master and lint each repo X (IIRC X=10) times.

@dirtydanee
Copy link
Contributor Author

dirtydanee commented Jan 24, 2019

@marcelofabri Sorry for the confusion! Here are my results for 10 iterations:

Message: Linting Aerial with this PR took 1.47s vs 1.39s on master (5% slower)
Message: Linting Alamofire with this PR took 2.34s vs 2.22s on master (5% slower)
Message: Linting Firefox with this PR took 8.25s vs 8.1s on master (1% slower)
Message: Linting Kickstarter with this PR took 12.6s vs 12.94s on master (2% faster)
Message: Linting Moya with this PR took 1.28s vs 1.33s on master (3% faster)
Message: Linting Nimble with this PR took 1.2s vs 1.22s on master (1% faster)
Message: Linting Quick with this PR took 0.33s vs 0.33s on master (0% slower)
Message: Linting Realm with this PR took 2.07s vs 2.08s on master (0% faster)
Message: Linting SourceKitten with this PR took 0.78s vs 0.78s on master (0% slower)
Message: Linting Sourcery with this PR took 3.11s vs 3.14s on master (0% faster)
Message: Linting Swift with this PR took 19.39s vs 19.21s on master (0% slower)
Message: Linting WordPress with this PR took 12.49s vs 12.51s on master (0% faster)

My hardware config is:
screenshot 2019-01-24 at 22 48 34

@jpsim
Copy link
Collaborator

jpsim commented Jan 24, 2019

Those local perf numbers look good.

@marcelofabri marcelofabri merged commit a1b659a into realm:master Jan 25, 2019
@marcelofabri
Copy link
Collaborator

Thanks @dirtydanee!

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

Successfully merging this pull request may close these issues.

explicit_type_interface rule triggered in case let switches
4 participants