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

[Fix #43] Remove change_column_null from BulkChangeTable #48

Conversation

anthony-robin
Copy link
Contributor

The change_column_null method does not have corresponding method to
use in the suggested change_table version.

We should remove it from the offended methods list.


Before submitting the PR make sure the following are checked:

  • 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.
  • Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences.
  • Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

@koic
Copy link
Member

koic commented Jun 11, 2019

@wata727 You are the original author of this cop and the developer who added this feature.
rubocop/rubocop#5881

Do you have any concerns about including this change?

@wata727
Copy link
Contributor

wata727 commented Jun 11, 2019

@koic Thank you for letting me know, and sorry I missed it. This change makes sense to me.

Btw, I have a little concern if it is worthwhile to force this style for now. While it is worthwhile to get to know the bulk option, I'm not sure it should always be enforced. This is based on feedback from users. See https://github.com/rubocop-hq/rubocop/issues/6002

Copy link
Contributor

@wata727 wata727 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@koic
Copy link
Member

koic commented Jun 11, 2019

@wata727 Thank you for your quick response and review.
@anthony-robin Would you please rebase the changelog entry with the latest master branch?

diff --git a/CHANGELOG.md b/CHANGELOG.md
index abdf246cb..58874e715 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@

 ## master (unreleased)

+### Bug fixes
+
+* [#43](https://github.com/rubocop-hq/rubocop-rails/issues/43): Remove `change_column_null` method from `BulkChangeTable` cop offenses. ([@anthony-robin][])
+
 ## 2.0.1 (2019-06-08)

 ### Changes

@anthony-robin anthony-robin force-pushed the remove_change_column_null_from_bulk_change_table branch from a43a98a to d551dcb Compare June 11, 2019 09:21
@anthony-robin
Copy link
Contributor Author

@koic Thanks, I just rebased !

@anthony-robin anthony-robin force-pushed the remove_change_column_null_from_bulk_change_table branch from d551dcb to 0582a9d Compare June 11, 2019 09:26
CHANGELOG.md Outdated
@@ -2,6 +2,10 @@

## master (unreleased)

### Bug fixes

* [#43](https://github.com/rubocop-hq/rubocop-rails/issues/43): REMOVE `change_column_null` method from `BulkChangeTable` cop offenses. ([@anthony-robin][])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please replace REMOVE with Remove.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, done !

The `change_column_null` method does not have corresponding method to
use in the suggested `change_table` version.

We should remove it from the offended methods list.
@anthony-robin anthony-robin force-pushed the remove_change_column_null_from_bulk_change_table branch from 0582a9d to 8fa626d Compare June 11, 2019 09:31
@anthony-robin anthony-robin changed the title [Fix #43] REMOVE change_column_null from BulkChangeTable [Fix #43] Remove change_column_null from BulkChangeTable Jun 11, 2019
@koic koic merged commit 4451089 into rubocop:master Jun 11, 2019
@koic
Copy link
Member

koic commented Jun 11, 2019

Thanks!

@anthony-robin anthony-robin deleted the remove_change_column_null_from_bulk_change_table branch June 11, 2019 10:09
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.

None yet

3 participants