Skip to content
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

Add the other auto generated migration file of ActiveStorage to Exclude files of Rails/CreateTableWithTimestamps #1011

Merged

Conversation

tka5
Copy link
Contributor

@tka5 tka5 commented May 22, 2023

  • #570 PR makes Rails/CreateTableWithTimestamps respect active_storage_variant_records table. But you forgot adding the other auto generated migration file named *_create_active_storage_variant_records.active_storage.rb. This file is used when we upgrage ActiveStorage. So I added it to Rails/CreateTableWithTimestamps.Exclude file list in config/default.yml.

Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.
  • If this is a new cop, consider making a corresponding update to the Rails Style Guide.

@koic
Copy link
Member

koic commented May 22, 2023

This looks good to me. Can you add a changelog entry?

@tka5 tka5 force-pushed the add-create-table-with-timestamp-exclude-file branch from e426c73 to 05780d0 Compare May 22, 2023 07:46
@tka5
Copy link
Contributor Author

tka5 commented May 22, 2023

@koic
Thanks! I added changelog.

@koic
Copy link
Member

koic commented May 22, 2023

@tka5 Can you squash your commits into one?

to `Exclude` files of `Rails/CreateTableWithTimestamps`
@tka5 tka5 force-pushed the add-create-table-with-timestamp-exclude-file branch from 05780d0 to 8b763b0 Compare May 22, 2023 08:16
@tka5
Copy link
Contributor Author

tka5 commented May 22, 2023

@koic
Thanks! I squashed.

@koic koic merged commit d3c268e into rubocop:master May 23, 2023
@koic
Copy link
Member

koic commented May 23, 2023

Thanks!

ChrisBAshton added a commit to alphagov/rubocop-govuk that referenced this pull request Jun 28, 2023
This release drops support for Ruby 2.7 (*breaking*) and also updates rubocop, rubocop-ast, rubocop-rails, rubocop-rake and rubocop-rspec. Summary of changes in [this diff](https://github.com/alphagov/rubocop-govuk/compare/c55d9f8a9b0693a0a4e6f93346e52362e4d43007..58b7f20640b4b68661f3771b0e803d83fc04ff12).

Tested against the following apps (following the precedent in #272):

- [Whitehall](https://github.com/alphagov/rubocop-govuk/actions/runs/5398651979/jobs/9804729806) ✅
- [Content Publisher](https://github.com/alphagov/rubocop-govuk/actions/runs/5398750820) 5 offences detected:
  - 4 `FactoryBot/CreateList` 'convention' violations ("Prefer `create_list`" where app has used for example `image_revisions: [create(:image_revision, filename: "960x640.jpg")],`)
    - Autocorrectable ✅
  - 1 `Lint/RedundantCopDisableDirective` 'warning' violation ("Unnecessary disabling of `Rails/CreateTableWithTimestamps`" for line `create_table :active_storage_variant_records do |t| # rubocop:disable Rails/CreateTableWithTimestamps`).
    - This appears to be down to [a change in rubocop-rails](rubocop/rubocop-rails#1011) in [2.20.0](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md#2200-2023-06-18)
- [Search API](https://github.com/alphagov/rubocop-govuk/actions/runs/5398752770) ✅
- [GDS API Adapters](https://github.com/alphagov/rubocop-govuk/actions/runs/5398753882) ✅
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants