Skip to content

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

Merged
merged 6 commits into from
Jan 4, 2019
Merged

Ameba + formatting #13

merged 6 commits into from
Jan 4, 2019

Conversation

Blacksmoke16
Copy link
Contributor

No description provided.

@Blacksmoke16
Copy link
Contributor Author

Blacksmoke16 commented Jan 4, 2019

@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.

Copy link
Member

@robacarp robacarp left a 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
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor

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?

Copy link
Contributor

@Sija Sija Jan 4, 2019

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)

@robacarp robacarp merged commit f9a23ec into amberframework:master Jan 4, 2019
@Blacksmoke16 Blacksmoke16 deleted the ameba branch January 4, 2019 20:05
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.

3 participants