Closed agrim123 closed 4 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...
We should probably come up with a decision here.
I'm happy to leave this to rubocop --auto-correct Gemfile
. 👍
Rendered