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

R Language Formatter in Editor #84

Open
gaocegege opened this issue Jun 2, 2017 · 10 comments
Open

R Language Formatter in Editor #84

gaocegege opened this issue Jun 2, 2017 · 10 comments

Comments

@gaocegege
Copy link
Member

Now there is no formatter to format the code, we need to import or implement one.

  /**
   * @see processing.app.ui.Editor#createFormatter()
   */
  @Override
  public Formatter createFormatter() {
    return null;
  }
@jeremydouglass
Copy link
Member

@gaocegege
Copy link
Member Author

Yes, it may works, and I have some connections with the authors of formatR, so we have technical support 😄

@jeremydouglass
Copy link
Member

What are we currently using for checking R code formatting on the repository? Ideally the Example Processing.R sketches will both:

  1. be unchanged when running the PDE R autoformatter
  2. pass continuous integration code checks on the repository

@gaocegege
Copy link
Member Author

We are using FormatRBear in coala, and its backend is formatR.

@gaocegege
Copy link
Member Author

Yeah, I agree with you :)

@gaocegege
Copy link
Member Author

Try to use formatR, which means if the user wanna to use the formatter, he/she needs R installed.

@jeremydouglass
Copy link
Member

if the user wanna to use the formatter, he/she needs R installed

As an alternative to the user installing R or to us including a full separate R install just for the PDE formatter...

Does formatR run in renjin?

http://packages.renjin.org/package/org.renjin.cran/formatR/1.2.1

Perhaps we could have the autoformatter call formatR through renjin, if it isn't too slow?

@gaocegege
Copy link
Member Author

We could have a try but there are 5 tests failed.

@jeremydouglass
Copy link
Member

I see -- then I think it is probably not worth trying.

@gaocegege
Copy link
Member Author

gaocegege commented Aug 23, 2017

There are some ways:

  • formatR, we run formatR in a separate process and send the code to the process to do the check. it needs the users to install R and formatR package
  • formatR in renjin, not sure if it works.
  • Find some native implementations in JVM for R code style checking.

@gaocegege gaocegege added this to the Someday milestone Aug 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants