-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 fixer using rubocop --auto-correct
#689
Conversation
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.
You can run the test suite on any system which runs Bash by using ./run-tests
, supposing you have installed Docker. Install Docker via your package manager and follow post-installation steps: https://docs.docker.com/engine/installation/linux/linux-postinstall/
For testing this, add some tests which use AssertEqual
for the function you added, and include a test which searches for a local rubocop directory. Look at existing tests for examples, include the rubocop linter tests.
autoload/ale/fixers/rubocop.vim
Outdated
\ . ' --auto-correct %t', | ||
\ 'read_temporary_file': 1, | ||
\} | ||
endfunction |
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.
Your indentation needs to be fixed here to match the other files. The test output mentions this somewhat.
@w0rp - just pushed the following updates:
Thanks for taking the time to review this PR. |
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.
Cool. I might fix up the Vader test file so I can run it directly in GVim, but this is good. 👍
Cheers! 🍻 |
Thanks!! 😃 |
This does seem to work as expected, but I was not able to create a vader test for this. Maybe someone familiar with the test env can give me some advice?
Here was my attempt:
This fails with the following error:
But the fixer does run when used with actual code in an editor.