rubygems / rfcs

RubyGems + Bundler RFCs
45 stars 40 forks source link

RFC for `bundle canonical` #15

Closed agrim123 closed 4 years ago

agrim123 commented 6 years ago

Rendered

deivid-rodriguez commented 6 years ago

I'm not sure this is worth adding to bundler. As I stated in bundler's PR

I'm unsure about this change, rubocop already provides a bunch of style rules for Gemfiles, and people caring about style & prettyness are probably using rubocop already. For those people, this new command will probably not be useful since it's very likely that it won't be able to achieve the level of flexibility rubocop already has. So in my opinion any efforts towards standarizing Gemfile's appearance should be focused on improving existing and adding new cops for rubocop.

To elaborate a bit further on this: Given the level of configurabily rubocop has, it seems unlikely that what bundler considers "canonical" exactly matches what rubocop considers "canonical". That means bundle canonical and rubocop --auto-correct Gemfile might give different results and compete/conflict with each other. And that might result in rubocop users not using bundle canonical because of this. And those are the users potentially interested in this feature...

deivid-rodriguez commented 4 years ago

We should probably come up with a decision here.

indirect commented 4 years ago

I'm happy to leave this to rubocop --auto-correct Gemfile. 👍