Skip to content

Commit 378b67f

Browse files
authored
Merge pull request #913 from rubocop-hq/fix-edge-rubocop-0.84-offences
Fix RuboCop edge 0.84 offences
2 parents 1a9af87 + 5f36556 commit 378b67f

File tree

4 files changed

+22
-13
lines changed

4 files changed

+22
-13
lines changed

.rubocop.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,8 @@ AllCops:
1616
Layout/HashAlignment:
1717
Enabled: false
1818

19-
Metrics/BlockLength:
20-
Exclude:
21-
- rubocop-rspec.gemspec
22-
- Rakefile
23-
- '**/*.rake'
24-
- spec/**/*.rb
25-
26-
Naming/FileName:
27-
Exclude:
28-
- lib/rubocop-rspec.rb
19+
Layout/LineLength:
20+
Max: 80 # default: 120
2921

3022
Layout/MultilineMethodCallIndentation:
3123
EnforcedStyle: indented
@@ -42,6 +34,17 @@ Lint/InterpolationCheck:
4234
Exclude:
4335
- spec/**/*.rb
4436

37+
Metrics/BlockLength:
38+
Exclude:
39+
- rubocop-rspec.gemspec
40+
- Rakefile
41+
- '**/*.rake'
42+
- spec/**/*.rb
43+
44+
Naming/FileName:
45+
Exclude:
46+
- lib/rubocop-rspec.rb
47+
4548
RSpec/ExampleLength:
4649
Max: 30
4750

Rakefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,12 @@ task confirm_config: :build_config do
4242
_, stdout, _, process =
4343
Open3.popen3('git diff --exit-code config/default.yml')
4444

45-
unless process.value.success?
46-
raise "default.yml is out of sync:\n\n#{stdout.read}\nRun bin/build_config"
47-
end
45+
raise <<~ERROR unless process.value.success?
46+
default.yml is out of sync:
47+
48+
#{stdout.read}
49+
Run bin/build_config
50+
ERROR
4851
end
4952

5053
desc 'Confirm documentation is up to date'

lib/rubocop/cop/rspec/rails/http_status.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class SymbolicStyleChecker
7070
'to describe HTTP status code.'
7171

7272
attr_reader :node
73+
7374
def initialize(node)
7475
@node = node
7576
end
@@ -110,6 +111,7 @@ class NumericStyleChecker
110111
ALLOWED_STATUSES = %i[error success missing redirect].freeze
111112

112113
attr_reader :node
114+
113115
def initialize(node)
114116
@node = node
115117
end

lib/rubocop/cop/rspec/shared_examples.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class Checker
4747
'to titleize shared examples.'
4848

4949
attr_reader :node
50+
5051
def initialize(node)
5152
@node = node
5253
end

0 commit comments

Comments
 (0)