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

replacing rbeautify with rubocop #275

Merged
merged 1 commit into from
May 2, 2015
Merged

Conversation

jney
Copy link
Contributor

@jney jney commented Apr 11, 2015

No description provided.

@miketheman
Copy link
Contributor

Something worth considering is that since this uses rubocop's -a flag to autocorrect, will it load a custom .rubocop.yml file from and if so, which one?

@Glavin001
Copy link
Owner

I think I'm going to hold off on this for a little bit.
I do not want to break support for current users using rbeautify. How about this supports both? If rbeautify_path is set then use rbeautify, or if rubocop_path is set then use rubocop.
What're your thoughts?

@jney
Copy link
Contributor Author

jney commented Apr 20, 2015

How about this supports both?

@Glavin001, i thought about it. The problem was isStdout is set at the language inititialization, not at the beautifier launch, it involves that you must know at the beginning which beautifier you would use (whatever how many are declared).
Replacing was very simpler than supporting both.

@jney jney closed this Apr 20, 2015
@jney jney reopened this Apr 20, 2015
@Glavin001 Glavin001 mentioned this pull request Apr 20, 2015
14 tasks
@Glavin001
Copy link
Owner

The problem was isStdout is set at the language inititialization, not at the beautifier launch, it involves that you must know at the beginning which beautifier you would use (whatever how many are declared).

Very good point. I think I will end up merging this and migrating to rubocop. However, I do want to wait until I have redesigned Atom Beautify's internals. The new structure should allow supporting both and make adding beautifiers much easier. I don't want to break compatibility for any current users, at least not just yet -- although we did have to do this in the past before, and it caused many confusing issues to be created.

I just created #282 and once that is complete we will have support for both rubocop and rbeautify (legacy). We can potentially add deprecation warnings, too.

@Glavin001
Copy link
Owner

Almost done with #282! Then we can have both rubocop and rbeautify and it will be much easier to add more beautifiers, too!

@Glavin001 Glavin001 merged commit 755da22 into Glavin001:master May 2, 2015
@Glavin001
Copy link
Owner

This will be in the next release.

You can select your preferred beautifier, if it is not default, for each language in the Atom Beautify package settings:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants