Skip to content

Commit 90660d7

Browse files
committed
Update RuboCop 0.44.1 -> 0.47.1 for Travis builds
1 parent cc32dbc commit 90660d7

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

.rubocop.yml

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ Lint/Void:
1010
Metrics/AbcSize:
1111
Enabled: false
1212

13+
Metrics/BlockLength:
14+
Enabled: false
15+
1316
Metrics/LineLength:
1417
Max: 100
1518

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ gem 'rspec', '~> 3.0'
1010
gem 'coveralls'
1111

1212
# Pin RuboCop for Travis builds.
13-
gem 'rubocop', '0.44.1'
13+
gem 'rubocop', '0.47.1'

lib/overcommit/hook/commit_msg/message_format.rb

+7-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ def validate_pattern(message)
1717
expected_pattern_message = config['expected_pattern_message']
1818
sample_message = config['sample_message']
1919

20-
[
21-
'Commit message pattern mismatch.',
22-
"Expected : #{expected_pattern_message}",
23-
"Sample : #{sample_message}"
24-
].join("\n") unless message =~ /#{pattern}/
20+
unless message =~ /#{pattern}/
21+
[
22+
'Commit message pattern mismatch.',
23+
"Expected : #{expected_pattern_message}",
24+
"Sample : #{sample_message}"
25+
].join("\n")
26+
end
2527
end
2628
end
2729
end

lib/overcommit/hook_context/pre_push.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def pushed_refs
1717
end
1818
end
1919

20-
PushedRef = Struct.new(:local_ref, :local_sha1, :remote_ref, :remote_sha1) do # rubocop:disable Metrics/BlockLength, Metrics/LineLength
20+
PushedRef = Struct.new(:local_ref, :local_sha1, :remote_ref, :remote_sha1) do
2121
def forced?
2222
!(created? || deleted? || overwritten_commits.empty?)
2323
end

0 commit comments

Comments
 (0)