-
Notifications
You must be signed in to change notification settings - Fork 11
Ameba + formatting #13
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
Conversation
@Sija @drujensen @robacarp This is ready for review as well. Prob could also do a release after this. For the route constrains and optional segments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Blacksmoke16 thanks! It's good to get this in place. One small comment but it's not a blocker.
path[0..optional_start].each do |segment| | ||
carat_position += segment.size | ||
path[0..optional_start].each do |s| | ||
carat_position += s.size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only change that I don't care for...what's the benefit to switching these to single letter names?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was due to an ameba failure that it was shadowing the var segment
higher in the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm. I think ameba and I disagree about that -- segment on line 121 is declared and used inside the loop. Oh well, I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a problem with that rule too, maybe we could disable it globally in .ameba.yml
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, this could be rewritten to carat_position += path[0..optional_start].sum(&.size)
No description provided.