Skip to content

Commit

Permalink
change name to avoid collision & change default
Browse files Browse the repository at this point in the history
change name in changelog
  • Loading branch information
mduchenesavard committed Jan 4, 2022
1 parent 8defa94 commit bf5c472
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# main

* Added Cop `Migration/BulkChangeTable`
* Added Cop `Migration/UseChangeTableBulk`

# v0.1.0

Expand Down
4 changes: 2 additions & 2 deletions config/default.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Migration/BulkChangeTable:
Migration/UseChangeTableBulk:
Description: 'Enforces the use of option `bulk: true` with `change_table`'
Enabled: true
Include:
- db/migration/**/*.rb
- db/migrate/**

Rails/EnumPrefix:
Description: 'Set prefix options when using enums.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module Migration
# # good
#
# change_table :my_table, bulk: true
class BulkChangeTable < Base
class UseChangeTableBulk < Base
MSG = 'Use `change_table` with `bulk: true`.'
RESTRICT_ON_SEND = %i[change_table].freeze

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

RSpec.describe RuboCop::Cop::Migration::BulkChangeTable, :config do
RSpec.describe RuboCop::Cop::Migration::UseChangeTableBulk, :config do
context 'without change_table' do
it 'does not register an offense' do
expect_no_offenses <<~RUBY
Expand Down

0 comments on commit bf5c472

Please sign in to comment.