Skip to content

Commit e0beae0

Browse files
authored
Merge pull request #901 from ydah/fix/duplicate
Move to Reference in config/default.yml and remove the `@see` tag
2 parents 829378f + 853ec4f commit e0beae0

File tree

7 files changed

+12
-16
lines changed

7 files changed

+12
-16
lines changed

config/default.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,9 @@ Rails/BelongsTo:
226226
Description: >-
227227
Use `optional: true` instead of `required: false` for
228228
`belongs_to` relations.
229+
Reference:
230+
- https://guides.rubyonrails.org/5_0_release_notes.html
231+
- https://github.com/rails/rails/pull/18937
229232
Enabled: true
230233
VersionAdded: '0.62'
231234

@@ -244,6 +247,9 @@ Rails/Blank:
244247

245248
Rails/BulkChangeTable:
246249
Description: 'Check whether alter queries are combinable.'
250+
Reference:
251+
- https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-change_table
252+
- https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/Table.html
247253
Enabled: true
248254
VersionAdded: '0.57'
249255
Database: null
@@ -592,6 +598,9 @@ Rails/Inquiry:
592598

593599
Rails/InverseOf:
594600
Description: 'Checks for associations where the inverse cannot be determined automatically.'
601+
Reference:
602+
- https://guides.rubyonrails.org/association_basics.html#bi-directional-associations
603+
- https://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#module-ActiveRecord::Associations::ClassMethods-label-Setting+Inverses
595604
Enabled: true
596605
VersionAdded: '0.52'
597606
IgnoreScopes: false
@@ -1042,6 +1051,8 @@ Rails/TopLevelHashWithIndifferentAccess:
10421051

10431052
Rails/TransactionExitStatement:
10441053
Description: 'Avoid the usage of `return`, `break` and `throw` in transaction blocks.'
1054+
Reference:
1055+
- https://github.com/rails/rails/commit/15aa4200e083
10451056
Enabled: pending
10461057
VersionAdded: '2.14'
10471058

lib/rubocop/cop/rails/belongs_to.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ module Rails
4747
# class Post < ApplicationRecord
4848
# belongs_to :blog, optional: false
4949
# end
50-
#
51-
# @see https://guides.rubyonrails.org/5_0_release_notes.html
52-
# @see https://github.com/rails/rails/pull/18937
5350
class BelongsTo < Base
5451
extend AutoCorrector
5552
extend TargetRailsVersion

lib/rubocop/cop/rails/bulk_change_table.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ module Rails
6262
# t.string :nickname
6363
# end
6464
# end
65-
#
66-
# @see https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-change_table
67-
# @see https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/Table.html
6865
class BulkChangeTable < Base
6966
MSG_FOR_CHANGE_TABLE = <<~MSG.chomp
7067
You can combine alter queries using `bulk: true` options.
@@ -216,7 +213,7 @@ def support_bulk_alter?
216213
true
217214
when POSTGRESQL
218215
# Add bulk alter support for PostgreSQL in 5.2.0
219-
# @see https://github.com/rails/rails/pull/31331
216+
# See: https://github.com/rails/rails/pull/31331
220217
target_rails_version >= 5.2
221218
else
222219
false

lib/rubocop/cop/rails/ignored_skip_action_filter_option.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ module Rails
3535
# skip_before_action :login_required,
3636
# if: -> { trusted_origin? && action_name != "admin" }
3737
# end
38-
#
39-
# @see https://api.rubyonrails.org/classes/AbstractController/Callbacks/ClassMethods.html#method-i-_normalize_callback_options
4038
class IgnoredSkipActionFilterOption < Base
4139
MSG = <<~MSG.chomp.freeze
4240
`%<ignore>s` option will be ignored when `%<prefer>s` and `%<ignore>s` are used together.

lib/rubocop/cop/rails/inverse_of.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,6 @@ module Rails
137137
# class Blog < ApplicationRecord
138138
# has_many :posts, -> { order(published_at: :desc) }
139139
# end
140-
#
141-
# @see https://guides.rubyonrails.org/association_basics.html#bi-directional-associations
142-
# @see https://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#module-ActiveRecord::Associations::ClassMethods-label-Setting+Inverses
143140
class InverseOf < Base
144141
SPECIFY_MSG = 'Specify an `:inverse_of` option.'
145142
NIL_MSG = 'You specified `inverse_of: nil`, you probably meant to use `inverse_of: false`.'

lib/rubocop/cop/rails/reversible_migration.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,6 @@ module Rails
173173
# def change
174174
# remove_index :users, column: :email
175175
# end
176-
#
177-
# @see https://api.rubyonrails.org/classes/ActiveRecord/Migration/CommandRecorder.html
178176
class ReversibleMigration < Base
179177
include MigrationsHelper
180178

lib/rubocop/cop/rails/transaction_exit_statement.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ module Rails
4545
# # Commit
4646
# next if user.active?
4747
# end
48-
#
49-
# @see https://github.com/rails/rails/commit/15aa4200e083
5048
class TransactionExitStatement < Base
5149
MSG = <<~MSG.chomp
5250
Exit statement `%<statement>s` is not allowed. Use `raise` (rollback) or `next` (commit).

0 commit comments

Comments
 (0)