-
Notifications
You must be signed in to change notification settings - Fork 71
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 0.54 incompatibilty #28
Comments
I just looked at the forks of this project and saw that most are related to Rubocop version upgrades and/or style choices that people don't like in their project. Perhaps the best way forward is to rely on the default Rubocop style when none is provided by a Rails project bundling this gem, and then use the Rubocop provided by that project if it exists. This way the gem is decoupled from user preferences and insulated from Rubocop updates by gem users. |
I'm too tired today to think about implementing this but if you have any suggestions or ideas (or wanna take a crack at it) please let me know. I'll try to look into this over the weekend. |
Having the |
The fix-db-schema-conflicts gem currently does not support rubocop v0.54.0. The maintainer is considering solutions to allow projects to set the rubocop configuration used by fix-db-schema-conflicts. jakeonrails#28
This would fix jakeonrails#28
How about to make the rubocop run optional in the first place? In my case I'm interested in the columns sorting but not that much on this gem running rubocop for me. I consider that a separate step. How difficult do you think it could be to make the rubocop run a separate rake task? Maybe |
@oboxodo Sorry to take so long to reply. The problem with not running Rubocop's autocorrect is that the generated db/schema.rb by Rails often has very weird/obnoxious spacing, which can have the same effect as not having sorted columns when it comes to git diffs. Instead of swapping lines of code back and forth, you'll see the horizontal spacing jump back and forth within the same line. It's been literally years since I've had a raw db/schema.rb (that I haven't used this gem on) so it's hard for me to say if the problem still exists in Rails 5+. |
We've been using Rails 5 and recently upgraded to Rails 6. We have not seen any issues with horizontal spacing. We found this gem because we were looking for a way to consistently order the lines in |
I updated rubocop to 0.54 in an attempt to resolve #26 and received this error:
I was about to start working on the required changes when I realised that it wasn't clear what the strategy should be.
.rubocop_schema.49.yml
is used for rubocop installs >= 0.49. So should this gem….rubocop_schema.XX.yml
schema file every time the rubocop schema changes (entailing more checks in the code)I'm not sure how often rubocop changes their schema but two incompatibilities between 0.48 and 0.53 seems an annoying rate.
The text was updated successfully, but these errors were encountered: