Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update rubocop #1613

Merged
merged 1 commit into from
Dec 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/epubmaker/content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def inspect
# Construct Content object by passing a sequence of parameters or hash.
# Keys of +hash+ relate with each parameters.
# +file+ (or +hash+["file"]) is required. Others are optional.
def initialize(fileorhash, id = nil, media = nil, title = nil, level = nil, notoc = nil, properties = nil, chaptype = nil)
def initialize(fileorhash, id = nil, media = nil, title = nil, level = nil, notoc = nil, properties = nil, chaptype = nil) # rubocop:disable Metrics/ParameterLists
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rubocop:disable should be removed, IMO.

EPUBMaker::Content.new()は引数をハッシュ or 名前付き引数のみにしてしまった方が良さそうです。そうすればこのコメントは消せるはず)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

そうしますー

if fileorhash.instance_of?(Hash)
@id = fileorhash['id']
@file = fileorhash['file']
Expand Down
2 changes: 1 addition & 1 deletion lib/review/epubmaker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def push_contents(_basetmpdir)
hash['id'] = args[:id]
end
if args[:properties].present?
hash['properties'] = args[:properties].split(' ')
hash['properties'] = args[:properties].split(' ') # rubocop:disable Style/RedundantArgument
end
if args[:notoc].present?
hash['notoc'] = args[:notoc]
Expand Down
6 changes: 6 additions & 0 deletions lib/review/exception.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@

module ReVIEW
class Error < ::StandardError; end

class ApplicationError < Error; end

class ConfigError < ApplicationError; end

class CompileError < ApplicationError; end

class SyntaxError < CompileError; end

class FileNotFound < ApplicationError; end

class KeyError < CompileError; end
end
2 changes: 1 addition & 1 deletion lib/review/latexutils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def initialize_metachars(texcommand)
end
end

@metachars_re = /[#{Regexp.escape(@metachars.keys.join(''))}]/u
@metachars_re = /[#{Regexp.escape(@metachars.keys.join(''))}]/u # rubocop:disable Style/RedundantArgument

@metachars_invert = @metachars.invert
end
Expand Down
3 changes: 2 additions & 1 deletion review.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ Gem::Specification.new do |gem|
gem.add_dependency('rubyzip')
gem.add_development_dependency('pygments.rb')
gem.add_development_dependency('rake')
gem.add_development_dependency('rubocop', '~> 1.3.0')
gem.add_development_dependency('rubocop', '~> 1.6.0')
gem.add_development_dependency('rubocop-performance')
gem.add_development_dependency('rubocop-rake')
gem.add_development_dependency('simplecov')
gem.add_development_dependency('test-unit')
gem.add_development_dependency('unicode-eaw')
Expand Down