Fix RuboCop offense Style/For (#32530).

git-svn-id: http://svn.redmine.org/redmine/trunk@20153 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2020-10-20 15:22:11 +00:00
parent 84a4a4f8ed
commit 8d65078826
3 changed files with 3 additions and 11 deletions

View File

@@ -1041,14 +1041,6 @@ Style/EvalWithLocation:
Style/ExpandPathArguments: Style/ExpandPathArguments:
Enabled: false Enabled: false
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: each, for
Style/For:
Exclude:
- 'lib/redmine/export/pdf/issues_pdf_helper.rb'
- 'lib/redmine/export/pdf/wiki_pdf_helper.rb'
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle. # Configuration parameters: EnforcedStyle.
# SupportedStyles: format, sprintf, percent # SupportedStyles: format, sprintf, percent

View File

@@ -189,7 +189,7 @@ module Redmine
pdf.SetFontStyle('B',9) pdf.SetFontStyle('B',9)
pdf.RDMCell(190,5, l(:label_associated_revisions), "B") pdf.RDMCell(190,5, l(:label_associated_revisions), "B")
pdf.ln pdf.ln
for changeset in issue.changesets issue.changesets.each do |changeset|
pdf.SetFontStyle('B',8) pdf.SetFontStyle('B',8)
csstr = "#{l(:label_revision)} #{changeset.format_identifier} - " csstr = "#{l(:label_revision)} #{changeset.format_identifier} - "
csstr += format_time(changeset.committed_on) + " - " + changeset.author.to_s csstr += format_time(changeset.committed_on) + " - " + changeset.author.to_s
@@ -240,7 +240,7 @@ module Redmine
pdf.SetFontStyle('B',9) pdf.SetFontStyle('B',9)
pdf.RDMCell(190,5, l(:label_attachment_plural), "B") pdf.RDMCell(190,5, l(:label_attachment_plural), "B")
pdf.ln pdf.ln
for attachment in issue.attachments issue.attachments.each do |attachment|
pdf.SetFontStyle('',8) pdf.SetFontStyle('',8)
pdf.RDMCell(80,5, attachment.filename) pdf.RDMCell(80,5, attachment.filename)
pdf.RDMCell(20,5, number_to_human_size(attachment.filesize),0,0,"R") pdf.RDMCell(20,5, number_to_human_size(attachment.filesize),0,0,"R")

View File

@@ -87,7 +87,7 @@ module Redmine
pdf.SetFontStyle('B', 9) pdf.SetFontStyle('B', 9)
pdf.RDMCell(190, 5, l(:label_attachment_plural), "B") pdf.RDMCell(190, 5, l(:label_attachment_plural), "B")
pdf.ln pdf.ln
for attachment in page.attachments page.attachments.each do |attachment|
pdf.SetFontStyle('', 8) pdf.SetFontStyle('', 8)
pdf.RDMCell(80, 5, attachment.filename) pdf.RDMCell(80, 5, attachment.filename)
pdf.RDMCell(20, 5, number_to_human_size(attachment.filesize), 0, 0, "R") pdf.RDMCell(20, 5, number_to_human_size(attachment.filesize), 0, 0, "R")