turboladen / tailor

A RubyGem that allows for checking standard styling of Ruby files.
146 stars 18 forks source link

Multi-line parameter list should be indented as much as first argument #136

Open hauleth opened 11 years ago

hauleth commented 11 years ago

I.e.:

render(json: { success: false,
               message: warden.message,
               error:   resource.errors.as_json },
       status: :unauthorized)

Now it cause error, but according to many style guides (and my own opinion) it is good behaviour (Vim also format to that by default).

turboladen commented 11 years ago

I agree that that's certainly a widely-accepted style (I use that on occasion, myself too). This points to the idea that not everyone prefers the same style, and may every prefer multiple styles depending on the context. ...which points to the idea that tailor should probably allow you to specify this for these separate contexts. Sounds related to issue #94.

This is definitely something I'd like to do, but falls lower in the priority list of issues for me to tackle (lots of bugs still looming that I haven't been able to get to).