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

Navigate substructure even for different kinds on ASTRule #1248

Merged
merged 3 commits into from
Feb 9, 2017
Merged

Navigate substructure even for different kinds on ASTRule #1248

merged 3 commits into from
Feb 9, 2017

Conversation

marcelofabri
Copy link
Collaborator

Fixes #1237

I expect oss-check to introduce some violations that weren't being caught before.

let offset = dictionary.offset,
let length = dictionary.length,
let range = file.contents.bridge().byteRangeToNSRange(start: offset, length: length) else {
let elements = dictionary.elements?.filter({ $0.kind == conditionKind }) else {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this was needed to make sure that the pattern was in the condition, not inside an if body

@SwiftLintBot
Copy link

SwiftLintBot commented Jan 25, 2017

198 Warnings
⚠️ This PR introduced a violation in WordPress-iOS: /WordPress/WordPressTest/MediaPicker/MediaLibraryPickerDataSourceTests.swift#L162:20: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in swift: /stdlib/private/StdlibCollectionUnittest/CheckSequenceType.swift#L470:42: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘x’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/private/StdlibCollectionUnittest/CheckSequenceType.swift#L596:19: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘x’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/private/StdlibCollectionUnittest/CheckSequenceType.swift#L600:19: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘x’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/private/StdlibCollectionUnittest/CheckSequenceType.swift#L604:19: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘x’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/private/StdlibCollectionUnittest/CheckSequenceType.swift#L609:19: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘x’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/private/StdlibCollectionUnittest/CheckSequenceType.swift#L613:19: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘x’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/private/StdlibCollectionUnittest/CheckSequenceType.swift#L617:19: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘x’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/private/StdlibCollectionUnittest/CheckSequenceType.swift#L670:8: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘x’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/private/StdlibCollectionUnittest/CheckSequenceType.swift#L673:8: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘x’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/private/StdlibCollectionUnittest/CheckSequenceType.swift#L676:8: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘x’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/private/StdlibCollectionUnittest/CheckSequenceType.swift#L679:8: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘x’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/private/StdlibCollectionUnittest/CheckSequenceType.swift#L793:30: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘x’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/private/StdlibCollectionUnittest/CheckSequenceType.swift#L794:38: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘x’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/private/StdlibCollectionUnittest/CheckSequenceType.swift#L795:46: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘x’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/private/StdlibCollectionUnittest/CheckSequenceType.swift#L796:48: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘x’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/private/SwiftPrivate/IO.swift#L56:8: error: Variable Name Violation: Variable name should only contain alphanumeric characters: ‘_buffer’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/private/SwiftPrivateLibcExtras/SwiftPrivateLibcExtras.swift#L79:8: error: Variable Name Violation: Variable name should only contain alphanumeric characters: ‘_data’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/private/SwiftPrivateLibcExtras/SwiftPrivateLibcExtras.swift#L106:11: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘p’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/public/core/DebuggerSupport.swift#L42:12: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in swift: /stdlib/public/core/ManagedBuffer.swift#L80:45: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘v’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/public/core/ManagedBuffer.swift#L254:45: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘v’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/public/core/StringUTF8.swift#L85:8: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘i’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/public/core/StringUTF8.swift#L85:8: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘i’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/public/Platform/Platform.swift#L127:29: error: Variable Name Violation: Variable name should only contain alphanumeric characters: ‘va_args’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/public/Platform/Platform.swift#L133:29: error: Variable Name Violation: Variable name should only contain alphanumeric characters: ‘va_args’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/public/SDK/Foundation/Data.swift#L1584:61: error: Variable Name Violation: Variable name should only contain alphanumeric characters: ‘ptr_’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/public/SDK/Foundation/IndexSet.swift#L687:73: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘i’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/public/SDK/Foundation/NSStringAPI.swift#L419:8: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘s’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/public/SwiftOnoneSupport/SwiftOnoneSupport.swift#L64:27: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘a’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/public/SwiftOnoneSupport/SwiftOnoneSupport.swift#L64:39: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘b’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/public/SwiftOnoneSupport/SwiftOnoneSupport.swift#L65:17: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘a’ (variable_name)
⚠️ This PR introduced a violation in swift: /stdlib/public/SwiftOnoneSupport/SwiftOnoneSupport.swift#L65:29: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘b’ (variable_name)
⚠️ This PR introduced a violation in SourceKitten: /Source/SourceKittenFramework/ClangTranslationUnit.swift#L42:43: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘k’ (variable_name)
⚠️ This PR introduced a violation in SourceKitten: /Source/SourceKittenFramework/ClangTranslationUnit.swift#L42:46: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘v’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/CodeGenerated/Diffable.generated.swift#L34:19: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/CodeGenerated/Diffable.generated.swift#L135:19: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/CodeGenerated/Diffable.generated.swift#L146:19: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L212:24: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L234:24: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L38:68: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘s1’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L38:80: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘s2’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L39:69: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘s1’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L39:81: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘s2’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L40:69: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘s1’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L40:81: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘s2’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L42:55: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘v’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L43:53: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘v’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L44:52: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘v’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L47:58: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘t’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L48:57: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘t’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L50:58: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘t’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L51:57: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘t’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L53:58: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘t’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L54:57: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘t’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L56:51: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘t’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L57:53: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘t’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L58:55: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘t’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L62:58: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘m’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L64:45: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘t’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L65:44: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘m’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L67:45: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘v’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L68:44: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘m’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L70:45: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘v’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L71:44: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘m’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Stencil/StencilTemplate.swift#L73:69: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘a’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /Sourcery/Generating/Template/Swift/SwiftTemplate.swift#L151:42: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘x’ (variable_name)
⚠️ This PR introduced a violation in Sourcery: /SourceryTests/SourcerySpec.swift#L24:74: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in Sourcery: /SourceryTests/SourcerySpec.swift#L72:74: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in Sourcery: /SourceryTests/SourcerySpec.swift#L105:67: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/ViewModels/AppDelegateViewModel.swift#L358:40: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/ViewModels/AppDelegateViewModel.swift#L416:29: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘id’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/CheckoutViewController.swift#L50:36: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘js’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/DashboardViewController.swift#L157:12: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/DiscoveryFiltersViewController.swift#L70:42: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘id’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/DiscoveryFiltersViewController.swift#L77:42: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘id’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/DiscoveryFiltersViewController.swift#L84:42: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘id’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/DiscoveryNavigationHeaderViewController.swift#L119:36: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘id’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/LoginToutViewController.swift#L46:12: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/ProfileViewController.swift#L41:36: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘ps’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/ProfileViewController.swift#L48:36: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘u’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/SortPagerViewController.swift#L83:37: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘id’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /Kickstarter-iOS/Views/Controllers/SettingsViewController.swift#L87:12: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in ios-oss: /Library/Navigation.swift#L558:22: error: Variable Name Violation: Variable name should only contain alphanumeric characters: ‘x_’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /Library/Navigation.swift#L558:38: error: Variable Name Violation: Variable name should only contain alphanumeric characters: ‘y_’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/DiscoveryFiltersViewModel.swift#L77:22: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘p’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/DiscoveryNavigationHeaderViewModel.swift#L207:14: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘id’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/DiscoveryPostcardViewModel.swift#L145:14: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘p’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/ProjectNotificationCellViewModel.swift#L43:29: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘on’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/RewardCellViewModel.swift#L66:17: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘p’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/SettingsViewModel.swift#L172:20: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘on’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/SettingsViewModel.swift#L225:35: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘on’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/SortPagerViewModel.swift#L72:21: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘id’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/SurveyResponseViewModel.swift#L144:34: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in ios-oss: /Library/ViewModels/UpdateDraftViewModel.swift#L214:27: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘id’ (variable_name)
⚠️ This PR introduced a violation in ios-oss: /LiveStream/Views/Controllers/LiveStreamViewController.swift#L147:53: warning: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘id’ (variable_name)
⚠️ This PR introduced a violation in Moya: /Sources/Moya/Endpoint.swift#L113:16: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in Moya: /Sources/Moya/Endpoint.swift#L114:39: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in Moya: /Sources/Moya/MoyaProvider+Internal.swift#L237:16: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR may need tests.
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/AuthenticationManager/AuthenticationSettingsViewController.swift#L238:16: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Browser/FaviconManager.swift#L108:32: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Browser/OpenInHelper.swift#L92:16: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Browser/SearchEngines.swift#L274:31: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘e’ (variable_name)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Browser/BrowserViewController.swift#L994:20: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Browser/BrowserViewController.swift#L1419:16: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Browser/BrowserViewController.swift#L1707:17: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Browser/BrowserViewController.swift#L1962:16: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Browser/BrowserViewController.swift#L2437:19: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Browser/BrowserViewController.swift#L3190:27: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Browser/Tab.swift#L319:16: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Browser/Tab.swift#L476:16: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Browser/TabTrayController.swift#L615:23: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Browser/TabTrayController.swift#L778:40: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘a’ (variable_name)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Browser/TabTrayController.swift#L778:56: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘b’ (variable_name)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Home/ActivityStreamPanel.swift#L431:19: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Home/RemoteTabsPanel.swift#L579:24: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Notifications/NotificationRootViewController.swift#L153:16: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Settings/AppSettingsOptions.swift#L175:24: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Settings/AppSettingsOptions.swift#L353:16: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Settings/ClearPrivateDataTableViewController.swift#L115:29: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘i’ (variable_name)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Settings/SettingsContentViewController.swift#L130:16: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Settings/SearchSettingsTableViewController.swift#L165:70: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘e’ (variable_name)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Settings/SearchSettingsTableViewController.swift#L165:73: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘f’ (variable_name)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Settings/SettingsTableViewController.swift#L487:20: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Settings/SettingsTableViewController.swift#L541:16: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /Client/Frontend/Widgets/TabsButton.swift#L169:20: warning: Unused Optional Binding Violation: Prefer != nil over let _ = (unused_optional_binding)
⚠️ This PR introduced a violation in firefox-ios: /ClientTests/ActivityStreamTests.swift#L34:62: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘a’ (variable_name)
⚠️ This PR introduced a violation in firefox-ios: /ClientTests/ActivityStreamTests.swift#L34:65: error: Variable Name Violation: Variable name should be between 3 and 40 characters long: ‘b’ (variable_name)
⚠️ This PR introduced a violation in firefox-ios: /Extensions/ShareTo/InitialViewController.swift#L50:27: error: Variable Name Violation: Variable name should start with a lowercase character: ‘Bool’ (variable_name)
⚠️ Danger found 198 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 130.
12 Messages
📖 Linting WordPress-iOS with this PR took 15.22s vs 15.16s on master (0% slower)
📖 Linting swift with this PR took 14.17s vs 14.94s on master (5% faster)
📖 Linting Aerial with this PR took 0.53s vs 0.51s on master (3% slower)
📖 Linting SourceKitten with this PR took 1.6s vs 1.54s on master (3% slower)
📖 Linting Sourcery with this PR took 3.24s vs 2.94s on master (10% slower)
📖 Linting ios-oss with this PR took 20.98s vs 21.22s on master (1% faster)
📖 Linting Alamofire with this PR took 4.15s vs 3.99s on master (4% slower)
📖 Linting firefox-ios with this PR took 23.22s vs 22.62s on master (2% slower)
📖 Linting Nimble with this PR took 2.28s vs 2.15s on master (6% slower)
📖 Linting Quick with this PR took 0.66s vs 0.65s on master (1% slower)
📖 Linting realm-cocoa with this PR took 3.66s vs 3.52s on master (3% slower)
📖 Linting Moya with this PR took 0.55s vs 0.57s on master (3% faster)

Generated by 🚫 danger

@codecov-io
Copy link

codecov-io commented Jan 25, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@ad10f81). Click here to learn what that means.

@@            Coverage Diff            @@
##             master    #1248   +/-   ##
=========================================
  Coverage          ?   81.93%           
=========================================
  Files             ?      168           
  Lines             ?     8348           
  Branches          ?        0           
=========================================
  Hits              ?     6840           
  Misses            ?     1508           
  Partials          ?        0
Impacted Files Coverage Δ
...ce/SwiftLintFramework/Rules/ExplicitInitRule.swift 91.48% <ø> (ø)
...rk/Rules/RedundantOptionalInitializationRule.swift 92.59% <ø> (ø)
...tLintFramework/Rules/RedundantVoidReturnRule.swift 95.91% <ø> (ø)
...ules/EmptyParenthesesWithTrailingClosureRule.swift 92.45% <ø> (ø)
Source/SwiftLintFramework/Protocols/ASTRule.swift 100% <100%> (ø)
...ntFramework/Rules/UnusedClosureParameterRule.swift 96.2% <100%> (ø)
...intFramework/Rules/UnusedOptionalBindingRule.swift 92% <80%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ad10f81...1225d17. Read the comment docs.

@marcelofabri marcelofabri mentioned this pull request Jan 30, 2017
@marcelofabri marcelofabri requested a review from jpsim January 30, 2017 13:54
@keith
Copy link
Collaborator

keith commented Feb 1, 2017

Thanks for submitting this one! I'll test this locally shortly, FWIW the RedundantNilCoalescingRule also has the non-recursive issue on master as well.

@marcelofabri
Copy link
Collaborator Author

@keith I think that might be another issue because that rule isn't an ASTRule

@keith
Copy link
Collaborator

keith commented Feb 1, 2017

Sorry, wrong rule, I meant the RedundantOptionalInitializationRule which is 😄

@keith
Copy link
Collaborator

keith commented Feb 1, 2017

It looks like with this test case in RedundantOptionalInitializationRule :

            "func foo() {\nvar myVar: Optional<Int>↓=nil\n}\n"

This still fails on this branch

@keith
Copy link
Collaborator

keith commented Feb 1, 2017

Ah, it looks like there's some duplicate custom logic in that rule that we'll need to fix as well.

@marcelofabri
Copy link
Collaborator Author

Ah, it looks like there's some duplicate custom logic in that rule that we'll need to fix as well.

From a quick look I haven't found a motive to fail. My bet is that it's the same problem as #136.

@marcelofabri
Copy link
Collaborator Author

In fact, running sourcekitten structure:

{
  "key.diagnostic_stage" : "source.diagnostic.stage.swift.parse",
  "key.substructure" : [
    {
      "key.offset" : 0,
      "key.nameoffset" : 5,
      "key.accessibility" : "source.lang.swift.accessibility.internal",
      "key.length" : 47,
      "key.name" : "foo()",
      "key.bodyoffset" : 12,
      "key.kind" : "source.lang.swift.decl.function.free",
      "key.namelength" : 5,
      "key.bodylength" : 34
    }
  ],
  "key.offset" : 0,
  "key.length" : 48
}

Copy link
Collaborator

@jpsim jpsim left a comment

Choose a reason for hiding this comment

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

This looks good to me. @keith it's hard to tell if you still have some reservations about this.

@keith
Copy link
Collaborator

keith commented Feb 9, 2017

Nope, I think this fixes what it meant to. This just didn't fix what I was hoping, but that's not the fault of this code, just my misunderstanding!

@jpsim
Copy link
Collaborator

jpsim commented Feb 9, 2017

🚢 ❗️

@jpsim jpsim merged commit be9f92f into realm:master Feb 9, 2017
@marcelofabri marcelofabri deleted the bugfix_1237 branch February 14, 2017 14:54
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.

5 participants