Skip to content

Rubocop 0.54 incompatibilty #28

Open
@ideasasylum

Description

@ideasasylum

I updated rubocop to 0.54 in an attempt to resolve #26 and received this error:

$ rails db:migrate RAILS_ENV=test
Dumping database schema with fix-db-schema-conflicts gem
Error: The `Style/TrailingCommaInLiteral` cop no longer exists. Please use `Style/TrailingCommaInArrayLiteral` and/or `Style/TrailingCommaInHashLiteral` instead.
(obsolete configuration found in /Users/jamie/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/fix-db-schema-conflicts-3.0.2/.rubocop_schema.49.yml, please update it)

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…

  1. add a new .rubocop_schema.XX.yml schema file every time the rubocop schema changes (entailing more checks in the code)
  2. Maintain support only for the most recent rubocop?

I'm not sure how often rubocop changes their schema but two incompatibilities between 0.48 and 0.53 seems an annoying rate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions