We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
just have a look at this short example
before
class FooController def update output=b_logic('AccountNote::Update', {:account_note_id => params[:id], :account_note_attributes => params[:model]}) if @account_note render :json => @account_note.to_json else render :json => {:errors => format_errors(output.error_messages, :format => :for_json)}, :status => 404 end end end
after running rubocop --only AlignHash --auto-correct aligh_hash_bug.rb
rubocop --only AlignHash --auto-correct aligh_hash_bug.rb
class FooController def update output=b_logic('AccountNote::Update', {:account_note_id => params[:id], :account_note_attributes => params[:model]}) if @account_note render :json => @account_note.to_json else render :json => {:errors => format_errors(output.error_messages, :status => 404 end end end
It correctly sees that :status should be aligned with :json but just deletes the rest of the line.
:status
:json
The text was updated successfully, but these errors were encountered:
Ouch! I'll take a look.
Sorry, something went wrong.
3720859
Merge pull request #1218 from jonas054/fix_1214
e2ca489
[Fix #1214] Require one key per line for inspection in AlignHash
jonas054
No branches or pull requests
just have a look at this short example
before
after running
rubocop --only AlignHash --auto-correct aligh_hash_bug.rb
It correctly sees that
:status
should be aligned with:json
but just deletes the rest of the line.The text was updated successfully, but these errors were encountered: