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 spaced_type_declaration rule #1345

Closed
wants to merge 2 commits into from

Conversation

dernster
Copy link

@dernster dernster commented Mar 8, 2017

Added spaced_type_declaration rule that warns if either the start or end of a type declaration is not enclosed by two empty lines.

For example:

protocol Protocol {
    func somethingAmazing()
}
class Example {
    let value = ""
}

should be written as follows:

protocol Protocol {

    func somethingAmazing()

}

class Example {

    let value = ""

}

I have done two commits: the first one is the actual implementation of this rule and the second one is the result of autocorrecting the entire project so that all tests run successfully. Please let me know if there is something I missed.

@dernster dernster force-pushed the spaced-type-declaration-rule branch from 36a6e5e to 9a07a6f Compare March 8, 2017 04:34
@SwiftLintBot
Copy link

SwiftLintBot commented Mar 8, 2017

9677 Warnings
⚠️ This PR introduced a violation in WordPress-iOS: /WordPress/WordPressUITests/XCTest+Extensions.swift#L120:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Example/Source/AppDelegate.swift#L27:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Example/Source/AppDelegate.swift#L63:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Example/Source/MasterViewController.swift#L95:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L43:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L46:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L74:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L89:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L101:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L106:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L118:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L125:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L132:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L137:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L138:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L141:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L142:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L180:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L259:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L262:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L270:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L273:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L295:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L298:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L324:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L327:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L344:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L349:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L363:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L366:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L376:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L379:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L415:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L418:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L436:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L439:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/AFError.swift#L459:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Example/Source/DetailViewController.swift#L28:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Example/Source/DetailViewController.swift#L29:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Example/Source/DetailViewController.swift#L30:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Example/Source/DetailViewController.swift#L28:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Example/Source/DetailViewController.swift#L140:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Example/Source/DetailViewController.swift#L145:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Example/Source/DetailViewController.swift#L172:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Example/Source/DetailViewController.swift#L177:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Example/Source/DetailViewController.swift#L211:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/DispatchQueue+Alamofire.swift#L28:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/DispatchQueue+Alamofire.swift#L36:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Alamofire.swift#L35:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Alamofire.swift#L47:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Alamofire.swift#L52:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Alamofire.swift#L64:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Alamofire.swift#L76:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Alamofire.swift#L81:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Alamofire.swift#L86:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Alamofire.swift#L116:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/NetworkReachabilityManager.swift#L42:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/NetworkReachabilityManager.swift#L45:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/NetworkReachabilityManager.swift#L52:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/NetworkReachabilityManager.swift#L54:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/NetworkReachabilityManager.swift#L200:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Notifications.swift#L40:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Notifications.swift#L41:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Notifications.swift#L41:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Notifications.swift#L50:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Notifications.swift#L51:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Notifications.swift#L51:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/MultipartFormData.swift#L49:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/MultipartFormData.swift#L50:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/MultipartFormData.swift#L53:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/MultipartFormData.swift#L54:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/MultipartFormData.swift#L55:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/MultipartFormData.swift#L53:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/MultipartFormData.swift#L75:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/MultipartFormData.swift#L78:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/MultipartFormData.swift#L89:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/MultipartFormData.swift#L579:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/ParameterEncoding.swift#L30:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/ParameterEncoding.swift#L39:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/ParameterEncoding.swift#L57:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/ParameterEncoding.swift#L81:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/ParameterEncoding.swift#L82:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/ParameterEncoding.swift#L264:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/ParameterEncoding.swift#L351:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/ParameterEncoding.swift#L426:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/ParameterEncoding.swift#L431:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/ParameterEncoding.swift#L432:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L68:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L119:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L143:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L201:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L259:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L322:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L349:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L411:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L419:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L422:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L430:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L435:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L436:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L440:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L443:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L444:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L448:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L451:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L452:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L456:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L459:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L460:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Response.swift#L464:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L36:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L57:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L62:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L63:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L80:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L84:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L236:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L260:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L343:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L353:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L363:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L410:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L439:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L451:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L471:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L545:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L555:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L580:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L618:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L627:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L628:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L643:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L644:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L626:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L627:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ This PR introduced a violation in Alamofire: /Source/Request.swift#L644:1: warning: Spaced Type Declarations Violation: The start and end of a type declaration must be enclosed by two empty lines. (spaced_type_declarations)
⚠️ Danger found 9677 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 136.
12 Messages
📖 Linting WordPress-iOS with this PR took 17.92s vs 16.83s on master (6% slower)
📖 Linting swift with this PR took 15.5s vs 16.29s on master (4% faster)
📖 Linting Aerial with this PR took 0.6s vs 0.58s on master (3% slower)
📖 Linting SourceKitten with this PR took 1.68s vs 1.75s on master (4% faster)
📖 Linting Sourcery with this PR took 3.73s vs 3.89s on master (4% faster)
📖 Linting ios-oss with this PR took 23.63s vs 24.04s on master (1% faster)
📖 Linting Alamofire with this PR took 4.55s vs 4.69s on master (2% faster)
📖 Linting firefox-ios with this PR took 24.97s vs 24.99s on master (0% faster)
📖 Linting Nimble with this PR took 2.54s vs 2.44s on master (4% slower)
📖 Linting Quick with this PR took 0.75s vs 0.78s on master (3% faster)
📖 Linting realm-cocoa with this PR took 3.97s vs 3.88s on master (2% slower)
📖 Linting Moya with this PR took 0.59s vs 0.59s on master (0% slower)

Generated by 🚫 danger

@codecov-io
Copy link

codecov-io commented Mar 8, 2017

Codecov Report

Merging #1345 into master will increase coverage by 0.15%.
The diff coverage is 98.07%.

@@            Coverage Diff             @@
##           master    #1345      +/-   ##
==========================================
+ Coverage   81.93%   82.09%   +0.15%     
==========================================
  Files         170      171       +1     
  Lines        8660     8712      +52     
==========================================
+ Hits         7096     7152      +56     
+ Misses       1564     1560       -4
Impacted Files Coverage Δ
...intFramework/Rules/ClassDelegateProtocolRule.swift 100% <ø> (ø)
...nfigurations/OverridenSuperCallConfiguration.swift 69.69% <ø> (ø)
.../SwiftLintFramework/Rules/ImplicitGetterRule.swift 100% <ø> (ø)
...onfigurations/StatementPositionConfiguration.swift 61.9% <ø> (ø)
.../Rules/RuleConfigurations/RegexConfiguration.swift 93.93% <ø> (ø)
...urce/SwiftLintFramework/Rules/AttributesRule.swift 98.2% <ø> (ø)
Tests/SwiftLintFrameworkTests/ReporterTests.swift 83.72% <ø> (ø)
...urce/SwiftLintFramework/Rules/FirstWhereRule.swift 91.3% <ø> (ø)
...ork/Extensions/NSRegularExpression+SwiftLint.swift 100% <ø> (ø)
...ftLintFramework/Reporters/CheckstyleReporter.swift 90.9% <ø> (ø)
... and 155 more

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 a964167...9a07a6f. Read the comment docs.

@kimdv
Copy link
Contributor

kimdv commented Mar 8, 2017

I like this !

@marcelofabri
Copy link
Collaborator

I'm not sure we should apply this to the project itself. Also, this really should be an opt-in rule.

Can you take a look into #640? This will fix that issue, but there're a few ideas there that might be useful to implement, such as making the rule configurable.

@jpsim
Copy link
Collaborator

jpsim commented Mar 10, 2017

Thanks for the PR, and I definitely agree with @marcelofabri that this rule should be configurable, and that SwiftLint itself would use slightly different settings.

@dernster
Copy link
Author

@marcelofabri @jpsim Thanks for your comments. I'm thinking of a configuration to specify the number of inner padding lines and the number of outer padding lines within a type declaration. They should always be applied symmetrically to the declaration, like this:

+ outer_padding_lines
class Example {
+ inner_padding_lines
   var foo: Int
   var bar: String
   func function() {
      ....
   }
+ inner_padding_lines
}
+ outer_padding_lines

What do you think? Is it ok if I force a git push to this branch?

@marcelofabri
Copy link
Collaborator

marcelofabri commented Mar 22, 2017

I think we really should be flexible here, since there's not really a convention. I'd propose the configuration to be like:

outer_padding:
  beginning: 1
  end: 1
inner_padding:
  beginning: 1
  end: 1

We could also support something like outer_padding: 1 to say it's symmetrical. What do you think?

And it's ok to force push this since usually no one works on other's forks.

Copy link
Collaborator

@marcelofabri marcelofabri left a comment

Choose a reason for hiding this comment

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

requesting changes based on comments already made

@jpsim
Copy link
Collaborator

jpsim commented May 24, 2017

Closing due to lack of activity.

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.

6 participants