Skip to content

Commit da11209

Browse files
authored
Merge pull request #1338 from Earlopain/enable-undefined-config
Enable `InternalAffairs/UndefinedConfig`
2 parents ecc1d6d + d83f48a commit da11209

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

.rubocop.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ AllCops:
1919
InternalAffairs/NodeMatcherDirective:
2020
Enabled: false
2121

22-
# FIXME: Workaround for a false positive caused by this cop when using `bundle exec rake`.
23-
InternalAffairs/UndefinedConfig:
24-
Enabled: false
25-
2622
Naming/InclusiveLanguage:
2723
Enabled: true
2824
CheckStrings: true

lib/rubocop/cop/rails/present.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ def on_and(node)
9898
end
9999

100100
def on_or(node)
101-
return unless cop_config['NilOrEmpty']
102-
103101
exists_and_not_empty?(node) do |var1, var2|
104102
return unless var1 == var2
105103

lib/rubocop/cop/rails/skips_model_validations.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ def allowed_method?(node)
100100
end
101101

102102
def forbidden_methods
103-
obsolete_result = cop_config['Blacklist']
103+
# TODO: Remove when RuboCop Rails 3 releases.
104+
obsolete_result = cop_config['Blacklist'] # rubocop:disable InternalAffairs/UndefinedConfig
104105
if obsolete_result
105106
warn '`Blacklist` has been renamed to `ForbiddenMethods`.' unless @displayed_forbidden_warning
106107
@displayed_forbidden_warning = true
@@ -111,7 +112,8 @@ def forbidden_methods
111112
end
112113

113114
def allowed_methods
114-
obsolete_result = cop_config['Whitelist']
115+
# TODO: Remove when RuboCop Rails 3 releases.
116+
obsolete_result = cop_config['Whitelist'] # rubocop:disable InternalAffairs/UndefinedConfig
115117
if obsolete_result
116118
warn '`Whitelist` has been renamed to `AllowedMethods`.' unless @displayed_allowed_warning
117119
@displayed_allowed_warning = true

0 commit comments

Comments
 (0)