RuboCop 0.50.0; lints

This commit is contained in:
Olle Jonsson 2017-09-18 21:04:10 +02:00
parent 7f12a55ae8
commit 9662c935c3
6 changed files with 11 additions and 7 deletions

View File

@ -26,7 +26,7 @@ Metrics/ClassLength:
Metrics/MethodLength: Metrics/MethodLength:
Enabled: false Enabled: false
Style/FileName: Naming/FileName:
Exclude: Exclude:
- 'bin/git-generate-changelog' - 'bin/git-generate-changelog'
@ -36,7 +36,7 @@ Metrics/AbcSize:
Enabled: false Enabled: false
# Offense count: 1 # Offense count: 1
Style/AccessorMethodName: Naming/AccessorMethodName:
Enabled: false Enabled: false
# Offense count: 10 # Offense count: 10
@ -75,3 +75,8 @@ Style/SafeNavigation:
Metrics/BlockLength: Metrics/BlockLength:
Exclude: Exclude:
- 'spec/**/*' - 'spec/**/*'
# Re-enable when merged; https://github.com/bbatsov/rubocop/pull/4756
Lint/InterpolationCheck:
Enabled: false

View File

@ -10,7 +10,7 @@ group :development, :test do
gem "bundler" gem "bundler"
gem "overcommit", ">= 0.31" gem "overcommit", ">= 0.31"
gem "rake" gem "rake"
gem "rubocop", ">= 0.43" gem "rubocop", ">= 0.50"
end end
group :development do group :development do

View File

@ -1,4 +1,3 @@
# coding: utf-8
# frozen_string_literal: true # frozen_string_literal: true
lib = File.expand_path("../lib", __FILE__) lib = File.expand_path("../lib", __FILE__)

View File

@ -78,7 +78,7 @@ module GitHubChangelogGenerator
issue["actual_date"] = commit["commit"]["author"]["date"] issue["actual_date"] = commit["commit"]["author"]["date"]
# issue['actual_date'] = commit['author']['date'] # issue['actual_date'] = commit['author']['date']
rescue rescue StandardError
puts "Warning: Can't fetch commit #{event['commit_id']}. It is probably referenced from another repo." puts "Warning: Can't fetch commit #{event['commit_id']}. It is probably referenced from another repo."
issue["actual_date"] = issue["closed_at"] issue["actual_date"] = issue["closed_at"]
end end

View File

@ -277,7 +277,7 @@ module GitHubChangelogGenerator
begin begin
param = match[2].nil? param = match[2].nil?
rescue rescue StandardError
puts "Can't detect user and name from first parameter: '#{arg0}' -> exit'" puts "Can't detect user and name from first parameter: '#{arg0}' -> exit'"
return return
end end

View File

@ -48,7 +48,7 @@ module GitHubChangelogGenerator
return if non_configuration_line?(line) return if non_configuration_line?(line)
option_name, value = extract_pair(line) option_name, value = extract_pair(line)
@options[option_key_for(option_name)] = convert_value(value, option_name) @options[option_key_for(option_name)] = convert_value(value, option_name)
rescue rescue StandardError
raise ParserError, "Failed on line ##{line_number}: \"#{line.gsub(/[\n\r]+/, '')}\"" raise ParserError, "Failed on line ##{line_number}: \"#{line.gsub(/[\n\r]+/, '')}\""
end end