Replies: 1 comment
-
We are unlike to ever change this default, given that the leading style is a lot more popular in the Ruby community these days. Both styles have some merits and some issues as discussed in great detail 10 years ago rubocop/ruby-style-guide#176 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The default style for the Layout/DotPosition cop in RuboCop is currently set to "leading". The alternative option is "trailing".
While the default "leading" style is acceptable, I've encountered a significant drawback that affects its usability.
When code is written in this style and copied into the console, an error is thrown:
SyntaxError ((irb):2: syntax error, unexpected '.')
.On the other hand, the "trailing" style offers a solution to this issue:
Using this style allows the code to be copied and pasted into the console seamlessly.
Considering the utility of use, I believe the "trailing" style is better and should be the default choice for RuboCop.
I would appreciate hearing your thoughts on this matter.
Beta Was this translation helpful? Give feedback.
All reactions