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
Rule request: Empty and comment lines in function bodies #2065
Labels
Comments
driver733
changed the title
Rule request: Empty and in-line comment lines in function bodies
Rule request: Empty and comment lines in function bodies
Feb 25, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 25, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 25, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 25, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 25, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 25, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 25, 2018
Replaced loop with flatMap
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 25, 2018
Edited rules.md
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 26, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 26, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 26, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 26, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 26, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 26, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 26, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 26, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 26, 2018
Replaced loop with flatMap
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 26, 2018
Edited rules.md
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 26, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 26, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Feb 28, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Mar 1, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Mar 1, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Mar 1, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Mar 1, 2018
driver733
pushed a commit
to driver733/SwiftLint
that referenced
this issue
Mar 1, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
New Issue Checklist
Rule Request
Description
Each method should fulfill only one goal, therefore, it should not contain any "parts". If you see that the code blocks in your method beg for logical separation - do not separate these blocks using an empty line, instead, refactor your method by splitting it into several ones or create a new class.
In addition, the code, in my opinion, should not have in-line comments. If any kind of explanations is needed, it has to be put in the method or class documentation. Furthermore, if your code requires comments, then it might be necessary to refactor it, so that it would be self-explainatory.
Read: An Empty Line is a Code Smell, Adoption of a custom checkstyle rule
What would trigger?
What would not trigger?
Configurable?
The rule should not be configurable.
Opt-in or enabled?
This rule could be a personal preference or coding style from various individuals, so it could be kept as opt-in.
The text was updated successfully, but these errors were encountered: