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

#2065 - New rule: Empty and comment lines in function bodies. #2066

Closed
wants to merge 15 commits into from

Conversation

driver733
Copy link

@driver733 driver733 commented Feb 25, 2018

As per #2065
In this PR I have implemented a new rule, which allows to prohibit the usage of whitespace and comment line in function bodies.

Copy link
Contributor

@ornithocoder ornithocoder left a comment

Choose a reason for hiding this comment

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

Don't forget the Tests/LinuxMain.swift and Tests/SwiftLintFrameworkTests/RulesTests.swift files as well.

CHANGELOG.md Outdated
@@ -22,10 +22,9 @@

#### Enhancements

* Adds `discouraged_optional_boolean` opt-in rule to discourage
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you mean to remove this rule entry from the change log?

CHANGELOG.md Outdated
the use of optional booleans.
[Ornithologist Coder](https://github.com/ornithocoder)
[#2011](https://github.com/realm/SwiftLint/issues/2011)
* Adds `function_body_whitespace_comment` opt-in rule to prohibit empty and comment lines in function bodies.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please note the length of these lines should not exceed 80 columns.

identifier: "function_body_whitespace_comment",
name: "Function Body Empty Lines",
description: "Functions bodies should not have whitespace and comment lines.",
kind: .metrics
Copy link
Contributor

Choose a reason for hiding this comment

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

How about .style instead of .metrics?

@@ -0,0 +1,44 @@
//
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider using triggering and nontTriggering examples when defining the rule (see other rules for example). With triggering and nontTriggering SwiftLint will:

  • Add examples to the Rules.md file
  • Build and run testes automatically looking for violations (making this test file unnecessary).

Copy link
Author

Choose a reason for hiding this comment

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

@ornithocoder I have changed the tests file. Now it is similar to FuctionBodyLengthRuleTests.

case let contentsNSString = file.contents.bridge(),
let startLine = contentsNSString.lineAndCharacter(forByteOffset: bodyOffset)?.line,
let endLine = contentsNSString.lineAndCharacter(forByteOffset: bodyOffset + bodyLength)?.line
else {
Copy link
Contributor

Choose a reason for hiding this comment

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

The else { / return indentation can be improved. Try to select the lines and use ^i (Control+i) to fix it.

else {
return []
}
for parameter in configuration.params {
Copy link
Contributor

Choose a reason for hiding this comment

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

You could map/flatMap there, returning an array of Violations. This would eliminate the need to return an empty array on line 48.

@driver733
Copy link
Author

@ornithocoder Thank you for the feedback! I have addressed your concerns.

@@ -20,13 +23,6 @@

* None.

#### Enhancements
Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't remove previous changlog entries.

Copy link
Author

Choose a reason for hiding this comment

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

@ornithocoder Sorry about that. This is fixed.

@marcelofabri
Copy link
Collaborator

I've merged #2068 which should fix the CI failure. Can you please rebase this PR?

@SwiftLintBot
Copy link

SwiftLintBot commented Feb 26, 2018

16170 Warnings
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/App/AppDelegate.swift:17:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 2 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/App/AppDelegate.swift:17:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 2 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/App/AppDelegate.swift:29:13: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/App/AppDelegate.swift:29:13: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/Preferences.swift:42:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 2 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/Preferences.swift:42:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 2 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/Preferences.swift:103:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/Preferences.swift:103:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/AssetLoaderDelegate.swift:14:1: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 2 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/AssetLoaderDelegate.swift:14:1: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 2 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/AssetLoaderDelegate.swift:58:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 4 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/AssetLoaderDelegate.swift:58:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 4 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/AssetLoaderDelegate.swift:83:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 4 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/AssetLoaderDelegate.swift:83:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 4 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:61:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 2 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:61:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 2 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:77:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:77:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:96:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 2 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:96:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 2 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:109:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 3 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:109:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 3 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:140:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 6 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:140:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 6 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:173:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 4 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:173:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 4 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:197:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 5 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:197:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 5 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:218:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 3 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:218:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 3 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:234:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 6 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:234:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 6 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:263:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 7 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoCache.swift:263:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 7 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Extensions/CollectionType+Shuffling.swift:12:14: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Extensions/CollectionType+Shuffling.swift:12:14: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:30:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 9 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:30:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 9 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:77:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 3 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:77:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 3 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:93:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 15 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:93:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 15 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:160:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:160:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:168:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 8 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:168:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 8 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:202:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 7 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoLoader.swift:202:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 7 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:60:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 7 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:60:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 7 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:90:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:90:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:100:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 9 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:100:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 9 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:141:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:141:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:153:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 4 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:153:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 4 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:180:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:180:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:187:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 6 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:187:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 6 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:218:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 3 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:218:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 3 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:237:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 4 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:237:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 4 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:275:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 6 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/Cache/VideoDownload.swift:275:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 6 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:70:14: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:70:14: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:77:14: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 8 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:77:14: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 8 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:125:15: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:125:15: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:132:15: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 3 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:132:15: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 3 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:161:15: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 2 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:161:15: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 2 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:185:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 2 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:185:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 2 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:200:15: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 2 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:200:15: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 2 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:219:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:219:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:230:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 7 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:230:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 7 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:267:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 6 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:267:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 6 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:307:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 4 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:307:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 4 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:331:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:331:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:366:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 10 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:366:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 10 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:430:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 5 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:430:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 5 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:475:15: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 2 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:475:15: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 2 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:488:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 8 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:488:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 8 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:522:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Controllers/PreferencesWindowController.swift:522:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:29:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Views/CheckCellView.swift:29:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Tests/PreferencesTests.swift:22:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Tests/PreferencesTests.swift:22:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 1 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:31:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 4 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:31:5: warning: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 4 lines (function_body_whitespace_lines)
⚠️ This PR introduced a violation in Aerial: /Users/distiller/project/osscheck/Aerial/Aerial/Source/Models/ManifestLoader.swift:55:5: error: Function Body Whitespace Lines Violation: Function body should span 0 comment and whitespace lines or less : currently spans 3 lines (function_body_whitespace_lines)
⚠️ Danger found 16170 violations with this PR. Due to GitHub's max issue comment size, the number shown has been truncated to 109.
12 Messages
📖 Linting Aerial with this PR took 0.6s vs 0.46s on master (30% slower)
📖 Linting Alamofire with this PR took 4.49s vs 3.6s on master (24% slower)
📖 Linting Firefox with this PR took 16.19s vs 16.74s on master (3% faster)
📖 Linting Kickstarter with this PR took 23.25s vs 29.25s on master (20% faster)
📖 Linting Moya with this PR took 2.32s vs 2.58s on master (10% faster)
📖 Linting Nimble with this PR took 2.22s vs 2.52s on master (11% faster)
📖 Linting Quick with this PR took 0.64s vs 0.83s on master (22% faster)
📖 Linting Realm with this PR took 4.01s vs 5.02s on master (20% faster)
📖 Linting SourceKitten with this PR took 1.17s vs 1.47s on master (20% faster)
📖 Linting Sourcery with this PR took 5.26s vs 6.72s on master (21% faster)
📖 Linting Swift with this PR took 15.22s vs 18.17s on master (16% faster)
📖 Linting WordPress with this PR took 18.55s vs 21.48s on master (13% faster)

Generated by 🚫 Danger

@driver733
Copy link
Author

@marcelofabri Done.

@codecov-io
Copy link

codecov-io commented Feb 26, 2018

Codecov Report

Merging #2066 into master will increase coverage by <.01%.
The diff coverage is 87.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2066      +/-   ##
==========================================
+ Coverage   89.68%   89.68%   +<.01%     
==========================================
  Files         259      261       +2     
  Lines       15020    15100      +80     
  Branches      977      979       +2     
==========================================
+ Hits        13471    13543      +72     
- Misses       1532     1540       +8     
  Partials       17       17
Impacted Files Coverage Δ
...SwiftLintFramework/Extensions/File+SwiftLint.swift 91.97% <0%> (-2.77%) ⬇️
Tests/SwiftLintFrameworkTests/RulesTests.swift 100% <100%> (ø) ⬆️
...rkTests/FunctionBodyWhitespaceLinesRuleTests.swift 100% <100%> (ø)
...mework/Rules/FunctionBodyWhitespaceLinesRule.swift 95% <95%> (ø)
Source/SwiftLintFramework/Models/Command.swift 97.82% <0%> (+2.17%) ⬆️

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 52274de...a4d0370. Read the comment docs.

@driver733
Copy link
Author

@marcelofabri This PR is ready to be merged.

@driver733 driver733 closed this Mar 1, 2018
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