Skip to content
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

Add ruby formatting support using Rubocop. #220

Merged
merged 6 commits into from
Jun 1, 2023
Merged

Add ruby formatting support using Rubocop. #220

merged 6 commits into from
Jun 1, 2023

Conversation

akveritas
Copy link
Contributor

Solves #30

This change is based on an abandoned change by zinovyev:
https://github.com/zinovyev/vim-codefmt/tree/add-support-for-ruby
and matching pull request:
#132

I've added code comments to resolve dbarnett's question from that review, and added vroom tests.

call maktaba#ensure#IsNumber(a:startline)
call maktaba#ensure#IsNumber(a:endline)

let l:ignoreerrors = a:0 >= 1 ? a:1 : 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fun fact: You can also do let l:ignoreerrors = get(a:, 1, 0) for the same effect, slightly more cryptic but a bit more literal once you're used to the syntax.

Either way works fine here though, and I'm focused on getting this PR merged quickly after all the delays. =)

@dbarnett dbarnett merged commit f30608c into google:master Jun 1, 2023
@akveritas akveritas deleted the rubocop branch June 2, 2023 14:49
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.

2 participants