Skip to content

Commit 5916bd1

Browse files
authored
Merge pull request #1014 from rubocop-hq/shut-up-useless-useless-method-cop
Shut up UselessMethodDefinition cop
2 parents 2ea1fad + cb85669 commit 5916bd1

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.rubocop.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ Lint/InterpolationCheck:
3737
Exclude:
3838
- spec/**/*.rb
3939

40+
# When the `edge-rubocop` build is red, and we decide to disable the cop,
41+
# the rest of the builds become red if the cop has not yet been released.
42+
# Instead of waiting for RuboCop releases to make `edge-rubocop` green,
43+
# we prefer keeping disable directives here and there and check if they
44+
# are still needed once in a while.
45+
Lint/RedundantCopDisableDirective:
46+
Enabled: false
47+
4048
Metrics/BlockLength:
4149
Exclude:
4250
- rubocop-rspec.gemspec

spec/support/expect_offense.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ module ExpectOffense
99

1010
DEFAULT_FILENAME = 'example_spec.rb'
1111

12-
def expect_offense(source, filename = DEFAULT_FILENAME, *args, **kwargs)
12+
def expect_offense(source, filename = DEFAULT_FILENAME, *args, **kwargs) # rubocop:disable Lint/UselessMethodDefinition
1313
super
1414
end
1515

16-
def expect_no_offenses(source, filename = DEFAULT_FILENAME)
16+
def expect_no_offenses(source, filename = DEFAULT_FILENAME) # rubocop:disable Lint/UselessMethodDefinition
1717
super
1818
end
1919
end

0 commit comments

Comments
 (0)