Skip to content

Commit

Permalink
Merge pull request #1922 from kmuto/update-rubocop
Browse files Browse the repository at this point in the history
update rubocop 1.65.1
  • Loading branch information
kmuto authored Aug 19, 2024
2 parents e0a83db + 294d6e3 commit 1197c43
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion lib/review/builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ def over_secnolevel?(n)
## override TextUtils::detab
def detab(str, num = nil)
if num
super(str, num)
super
elsif @tabwidth
super(str, @tabwidth)
else
Expand Down
26 changes: 13 additions & 13 deletions lib/review/htmlbuilder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ def read(lines)

def list(lines, id, caption, lang = nil)
puts %Q(<div id="#{normalize_id(id)}" class="caption-code">)
super(lines, id, caption, lang)
super
puts '</div>'
end

Expand All @@ -480,7 +480,7 @@ def list_body(_id, lines, lang)

def source(lines, caption = nil, lang = nil)
puts %Q(<div class="source-code">)
super(lines, caption, lang)
super
puts '</div>'
end

Expand All @@ -500,7 +500,7 @@ def source_body(lines, lang)

def listnum(lines, id, caption, lang = nil)
puts %Q(<div id="#{normalize_id(id)}" class="code">)
super(lines, id, caption, lang)
super
puts '</div>'
end

Expand Down Expand Up @@ -737,7 +737,7 @@ def table(lines, id = nil, caption = nil)
else
puts %Q(<div class="table">)
end
super(lines, id, caption)
super
puts '</div>'
end

Expand Down Expand Up @@ -1117,9 +1117,9 @@ def inline_sec(id)
chap, id2 = extract_chapter_id(id)
n = chap.headline_index.number(id2)
anchor = 'h' + n.tr('.', '-')
%Q(<a href="#{chap.id}#{extname}##{anchor}">#{super(id)}</a>)
%Q(<a href="#{chap.id}#{extname}##{anchor}">#{super}</a>)
else
super(id)
super
end
rescue KeyError
app_error "unknown headline: #{id}"
Expand All @@ -1129,9 +1129,9 @@ def inline_sectitle(id)
if @book.config['chapterlink']
chap, id2 = extract_chapter_id(id)
anchor = 'h' + chap.headline_index.number(id2).tr('.', '-')
%Q(<a href="#{chap.id}#{extname}##{anchor}">#{super(id)}</a>)
%Q(<a href="#{chap.id}#{extname}##{anchor}">#{super}</a>)
else
super(id)
super
end
rescue KeyError
app_error "unknown headline: #{id}"
Expand All @@ -1154,7 +1154,7 @@ def inline_column_chap(chapter, id)
end

def inline_list(id)
str = super(id)
str = super
chapter, id = extract_chapter_id(id)
if @book.config['chapterlink']
%Q(<span class="listref"><a href="./#{chapter.id}#{extname}##{normalize_id(id)}">#{str}</a></span>)
Expand All @@ -1164,7 +1164,7 @@ def inline_list(id)
end

def inline_table(id)
str = super(id)
str = super
chapter, id = extract_chapter_id(id)
if @book.config['chapterlink']
%Q(<span class="tableref"><a href="./#{chapter.id}#{extname}##{normalize_id(id)}">#{str}</a></span>)
Expand All @@ -1174,7 +1174,7 @@ def inline_table(id)
end

def inline_img(id)
str = super(id)
str = super
chapter, id = extract_chapter_id(id)
if @book.config['chapterlink']
%Q(<span class="imgref"><a href="./#{chapter.id}#{extname}##{normalize_id(id)}">#{str}</a></span>)
Expand All @@ -1184,7 +1184,7 @@ def inline_img(id)
end

def inline_eq(id)
str = super(id)
str = super
chapter, id = extract_chapter_id(id)
if @book.config['chapterlink']
%Q(<span class="eqref"><a href="./#{chapter.id}#{extname}##{normalize_id(id)}">#{str}</a></span>)
Expand Down Expand Up @@ -1308,7 +1308,7 @@ def inline_balloon(str)
end

def inline_raw(str) # rubocop:disable Lint/UselessMethodDefinition
super(str)
super
end

def nofunc_text(str)
Expand Down
14 changes: 7 additions & 7 deletions lib/review/idgxmlbuilder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def inline_column_chap(chapter, id)
end

def inline_list(id)
"<span type='list'>#{super(id)}</span>"
"<span type='list'>#{super}</span>"
end

def list_header(id, caption, _lang)
Expand Down Expand Up @@ -304,7 +304,7 @@ def codelines_body(lines)

def list(lines, id, caption, lang = nil)
puts '<codelist>'
super(lines, id, caption, lang)
super
puts '</codelist>'
end

Expand All @@ -329,7 +329,7 @@ def emlistnum(lines, caption = nil, _lang = nil)

def listnum(lines, id, caption, lang = nil)
puts '<codelist>'
super(lines, id, caption, lang)
super
puts '</codelist>'
end

Expand Down Expand Up @@ -389,15 +389,15 @@ def quote(lines)
end

def inline_table(id)
"<span type='table'>#{super(id)}</span>"
"<span type='table'>#{super}</span>"
end

def inline_img(id)
"<span type='image'>#{super(id)}</span>"
"<span type='image'>#{super}</span>"
end

def inline_eq(id)
"<span type='eq'>#{super(id)}</span>"
"<span type='eq'>#{super}</span>"
end

def inline_imgref(id)
Expand Down Expand Up @@ -725,7 +725,7 @@ def inline_sub(str)
end

def inline_raw(str)
super(str).gsub('\\n', "\n")
super.gsub('\\n', "\n")
end

def inline_hint(str)
Expand Down
12 changes: 6 additions & 6 deletions lib/review/latexbuilder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ def image_header(id, caption)
end

def parse_metric(type, metric)
s = super(type, metric)
s = super
if @book.config['pdfmaker']['use_original_image_size'] && s.empty? && !metric.present?
return ' ' # pass empty to \reviewincludegraphics
end
Expand Down Expand Up @@ -1292,11 +1292,11 @@ def inline_hd_chap(chap, id)

def inline_sec(id)
if @book.config['chapterlink']
n = super(id)
n = super
anchor = n.tr('.', '-')
macro('reviewsecref', n, sec_label(anchor))
else
super(id)
super
end
rescue KeyError
app_error "unknown headline: #{id}"
Expand All @@ -1306,9 +1306,9 @@ def inline_sectitle(id)
if @book.config['chapterlink']
chap, id2 = extract_chapter_id(id)
anchor = chap.headline_index.number(id2).tr('.', '-')
macro('reviewsecref', super(id), sec_label(anchor))
macro('reviewsecref', super, sec_label(anchor))
else
super(id)
super
end
end

Expand All @@ -1321,7 +1321,7 @@ def inline_column_chap(chapter, id)
end

def inline_raw(str) # rubocop:disable Lint/UselessMethodDefinition
super(str)
super
end

def inline_sub(str)
Expand Down
2 changes: 1 addition & 1 deletion lib/review/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module ReVIEW
class Logger < ::Logger
def initialize(io = $stderr, progname: '--')
super(io, progname: progname)
super
self.formatter = ->(severity, _datetime, name, msg) { "#{severity} #{name}: #{msg}\n" }
end

Expand Down
2 changes: 1 addition & 1 deletion lib/review/plaintextbuilder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def compile_href(url, label)
end

def inline_raw(str)
super(str).gsub('\\n', "\n")
super.gsub('\\n', "\n")
end

def inline_hidx(_str)
Expand Down
4 changes: 2 additions & 2 deletions lib/review/tocprinter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ def headline(level, label, caption)
print "\x01H#{level}\x01"
end
# embed header information for tocparser
super(level, label, caption)
super
end

def base_block(type, lines, caption = nil)
puts "\x01STARTLIST\x01"
super(type, lines, caption)
super
puts "\x01ENDLIST\x01"
end

Expand Down
2 changes: 1 addition & 1 deletion review.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Gem::Specification.new do |gem|
gem.add_development_dependency('playwright-runner')
gem.add_development_dependency('pygments.rb')
gem.add_development_dependency('rake')
gem.add_development_dependency('rubocop', '~> 1.59.0')
gem.add_development_dependency('rubocop', '~> 1.65.1')
gem.add_development_dependency('rubocop-performance')
gem.add_development_dependency('rubocop-rake')
gem.add_development_dependency('simplecov')
Expand Down

0 comments on commit 1197c43

Please sign in to comment.