Skip to content

Commit 4982bfc

Browse files
author
Nick Campbell
committed
Fix Rubocop warnings about missing "department" for overrides
The cop `Migration/DepartmentName` was tripping over some un-prefixed overrides, this is a new warning in Rubocop 0.75 that we can fix trivially.
1 parent 38863a6 commit 4982bfc

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

lib/rubocop/cop/rspec/implicit_expect.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def offending_expect(node)
8282
end
8383
end
8484

85-
def is_expected_range(source_map) # rubocop:disable PredicateName
85+
def is_expected_range(source_map) # rubocop:disable Naming/PredicateName
8686
Parser::Source::Range.new(
8787
source_map.expression.source_buffer,
8888
source_map.expression.begin_pos,

spec/project/changelog_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
it 'has a valid URL' do
4040
issues.each do |issue|
4141
number = issue[:number].gsub(/\D/, '')
42-
pattern = %r{^https://github\.com/.+/.+/(?:issues|pull)/#{number}$} # rubocop:disable LineLength
42+
pattern = %r{^https://github\.com/.+/.+/(?:issues|pull)/#{number}$} # rubocop:disable Metrics/LineLength
4343
expect(issue[:url]).to match(pattern)
4444
end
4545
end

spec/rubocop/cop/rspec/cop_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@
2121

2222
let(:fake_cop) do
2323
stub_const('RuboCop::RSpec', Module.new)
24-
# rubocop:disable ClassAndModuleChildren, RSpec/LeakyConstantDeclaration
24+
# rubocop:disable Style/ClassAndModuleChildren
25+
# rubocop:disable RSpec/LeakyConstantDeclaration
2526
class RuboCop::RSpec::FakeCop < described_class
2627
def on_send(node)
2728
add_offense(node, message: 'I flag everything')
2829
end
2930
end
30-
# rubocop:enable ClassAndModuleChildren, RSpec/LeakyConstantDeclaration
31+
# rubocop:enable Style/ClassAndModuleChildren
32+
# rubocop:enable RSpec/LeakyConstantDeclaration
3133
RuboCop::RSpec::FakeCop
3234
end
3335

0 commit comments

Comments
 (0)