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 a fixer for r based on the styler package #2401

Merged
merged 8 commits into from Apr 23, 2019

Conversation

@tvatter
Copy link
Contributor

commented Mar 28, 2019

Fixes #1483.

This is a simple fixer for R based on the styler package. It should solve #1483 and has also been requested elsewhere.

@tvatter tvatter changed the title Add a fixer for r based on the style package Add a fixer for r based on the styler package Mar 28, 2019

@w0rp w0rp added this to In Review in Old Working List via automation Mar 29, 2019

@@ -0,0 +1,16 @@
" Author: tvatter <thibault.vatter@gmail.com>
" Description: Fixing R files with syler.

This comment has been minimized.

Copy link
@lorenzwalthert

lorenzwalthert Apr 10, 2019

There is a typo in syler.

This comment has been minimized.

Copy link
@tvatter

tvatter Apr 10, 2019

Author Contributor

Just corrected

@w0rp
Copy link
Member

left a comment

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.

@tvatter

This comment has been minimized.

Copy link
Contributor Author

commented Apr 10, 2019

  • Re list of supported tools: no problem.
  • Re test: I already read that and kind of gave up since I don't know much about vim script. However, it should be noted that the styler R package is already the subject of many unit tests.
@w0rp

This comment has been minimized.

Copy link
Member

commented Apr 10, 2019

Have a look at existing tests for fixers, and the documentation which shows how to write a test.

tvatter added 4 commits Apr 17, 2019
@tvatter

This comment has been minimized.

Copy link
Contributor Author

commented Apr 18, 2019

  • I updated the documentation
  • I added a simple test that the custom option is passed to the fixer.
@tvatter

This comment has been minimized.

Copy link
Contributor Author

commented Apr 22, 2019

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': {

This comment has been minimized.

Copy link
@lorenzwalthert

lorenzwalthert Apr 22, 2019

Well I think you might be missing a } here?

This comment has been minimized.

Copy link
@tvatter

tvatter Apr 22, 2019

Author Contributor

Right, thanks!

This comment has been minimized.

Copy link
@lorenzwalthert

lorenzwalthert Apr 22, 2019

Now tests pass, hooray 😄.

This comment has been minimized.

Copy link
@tvatter

tvatter Apr 22, 2019

Author Contributor

Indeed :)

@w0rp
w0rp approved these changes Apr 23, 2019

@w0rp w0rp merged commit ce0b149 into dense-analysis:master Apr 23, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

Old Working List automation moved this from In Review to Done Apr 23, 2019

@w0rp

This comment has been minimized.

Copy link
Member

commented Apr 23, 2019

Cheers! 🍻

@tvatter tvatter deleted the tvatter:fixers-styler branch Apr 23, 2019

@lorenzwalthert

This comment has been minimized.

Copy link

commented Apr 23, 2019

Thanks @tvatter. Do you want to tweet about it? I'll retweet.

@tvatter

This comment has been minimized.

Copy link
Contributor Author

commented Apr 23, 2019

Sure, I just did :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.