-
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 a fixer for r based on the styler package #2401
Conversation
autoload/ale/fixers/styler.vim
Outdated
@@ -0,0 +1,16 @@ | |||
" Author: tvatter <[email protected]> | |||
" Description: Fixing R files with syler. |
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.
There is a typo in syler
.
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.
Just corrected
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.
Looks good to me. Add it to the list of supported tools in the Markdown and Vim help files, and add a test for the fixer here. See :help ale-tests
.
|
Have a look at existing tests for fixers, and the documentation which shows how to write a test. |
|
The tests dot not pass, but it's not due to my stuff right? |
\ 'styler': { | ||
\ 'function': 'ale#fixers#styler#Fix', | ||
\ 'suggested_filetypes': ['r'], | ||
\ 'description': 'Fix R files with styler.', | ||
\ 'latexindent': { |
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.
Well I think you might be missing a }
here?
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.
Right, thanks!
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.
Now tests pass, hooray 😄.
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.
Indeed :)
Cheers! 🍻 |
Thanks @tvatter. Do you want to tweet about it? I'll retweet. |
Sure, I just did :) |
Fixes #1483.
This is a simple fixer for R based on the styler package. It should solve #1483 and has also been requested elsewhere.