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

Rubocop beautification doesn't work #1653

Closed
5 tasks done
vovanmix opened this issue May 9, 2017 · 4 comments
Closed
5 tasks done

Rubocop beautification doesn't work #1653

vovanmix opened this issue May 9, 2017 · 4 comments

Comments

@vovanmix
Copy link

vovanmix commented May 9, 2017

Description

Rubocop beautification doesn't work. I can see rubocop linters errors in the editor. If I run rubocop from the command line, it fixes all the errors.

Input Before Beautification

This is what the code looked like before:

class Calendar < ActiveRecord::Base
  has_many :users, through: :events, source: :eventable, source_type: 'User'




  validates :name, presence: true
end

Expected Output

The beautified code should have looked like this:

class Calendar < ActiveRecord::Base
  has_many :users, through: :events, source: :eventable, source_type: 'User'

  validates :name, presence: true
end

Actual Output

The beautified code actually looked like this:

class Calendar < ActiveRecord::Base
  has_many :users, through: :events, source: :eventable, source_type: 'User'




  validates :name, presence: true
end

Steps to Reproduce

  1. Add code to Atom editor
  2. Run command Atom Beautify: Beautify Editor
  3. This beautified code does not look right!

Debug

Here is a link to the debug.md Gist: Gist

Tried to run this in terminal:

/Users/vladimir/.rbenv/shims/rubocop --auto-correct --config /Users/vladimir/projects/breakaleg/.rubocop.yml /var/folders/63/jzj7mjl17fg0hzkm8j8psf700000gq/T/temp11748-19165-1jm0d43.n8h7i4quxr

And it beautifies the tmp file correctly.

Tried to make the .rubocop.yml empty, tried on many different .rb files. Beautification just doesn't work.

Checklist

I have:

  • Tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
  • Reloaded (or restarted) Atom to ensure it is not a caching issue
  • Searched through existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues
    so I know this is not a duplicate issue
  • Filled out the Input, Expected, and Actual sections above or have edited/removed them in a way that fully describes the issue.
  • Generated debugging information by executing Atom Beautify: Help Debug Editor command in Atom and added link for debug.md Gist to this issue
@eboyko
Copy link

eboyko commented May 9, 2017

Have the same issue

@Glavin001
Copy link
Owner

Duplicate of #1652

@Glavin001
Copy link
Owner

#1685 has been merged. Await next release.

@Glavin001
Copy link
Owner

Published to v0.30.0

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

3 participants