Enable Rubocop accessor grouping, fix existing offenses#8293
Enable Rubocop accessor grouping, fix existing offenses#8293jekyllbot merged 8 commits intojekyll:masterfrom
Conversation
db75644 to
b8bfc8d
Compare
ashmaroli
left a comment
There was a problem hiding this comment.
On the whole, I'm not a fan of listing attributes vertically in the alphabetic order because:
- longer lists pushes rest of the class structure downwards — more scrolling!
- when a new attribute is added, there's an (unnecessary) extra overhead to insert it in the correct place on the list for consistency.
Finding a balance between the above two is hard..
|
@ashmaroli Alphabetical order means that we subconsciously know where to look for a given attribute. I understand that longer lists pushes rest of the class structure downwards. If each attribute is on a separate line, adding or removing attributes changes only 1 line. In addition, most editors have the ability to sort multiple lines, so keeping order is easy. |
Co-authored-by: Ashwin Maroli <ashmaroli@users.noreply.github.com>
Co-authored-by: Ashwin Maroli <ashmaroli@users.noreply.github.com>
Co-authored-by: Ashwin Maroli <ashmaroli@users.noreply.github.com>
Co-authored-by: Ashwin Maroli <ashmaroli@users.noreply.github.com>
Co-authored-by: Ashwin Maroli <ashmaroli@users.noreply.github.com>
Co-authored-by: Ashwin Maroli <ashmaroli@users.noreply.github.com>
Co-authored-by: Ashwin Maroli <ashmaroli@users.noreply.github.com>
|
@jekyll: merge +dev |
Alex Malaszkiewicz: Enable Rubocop accessor grouping, fix existing offenses (#8293) Merge pull request 8293
This is refactoring.
Summary
Enables Rubocop
Style/AccessorGroupingrule.And fixes existing offenses related to accessor grouping.
Accessors with comments still have them, but in some cases I shortened them to the essential context.
Context
It isn't related to any GitHub issue.
The goal of this PR is to to use more strict rules with Rubocop.
Consequently, this is to ensure greater readability and uniformity of the code.
The functionality is the same.