summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.rubocop_todo.yml11
-rw-r--r--lib/axlsx/util/simple_typed_list.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/worksheet.rb2
-rw-r--r--test/workbook/tc_defined_name.rb3
-rw-r--r--test/workbook/worksheet/tc_header_footer.rb2
5 files changed, 4 insertions, 16 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index f2f2e40e..c56a7f5f 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -36,17 +36,6 @@ Layout/ArgumentAlignment:
- 'lib/axlsx/workbook/worksheet/sheet_view.rb'
- 'lib/axlsx/workbook/worksheet/table_style_info.rb'
-# Offense count: 4
-# This cop supports safe autocorrection (--autocorrect).
-# Configuration parameters: EnforcedStyleAlignWith.
-# SupportedStylesAlignWith: either, start_of_block, start_of_line
-Layout/BlockAlignment:
- Exclude:
- - 'lib/axlsx/util/simple_typed_list.rb'
- - 'lib/axlsx/workbook/worksheet/worksheet.rb'
- - 'test/workbook/tc_defined_name.rb'
- - 'test/workbook/worksheet/tc_header_footer.rb'
-
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
Layout/ClosingParenthesisIndentation:
diff --git a/lib/axlsx/util/simple_typed_list.rb b/lib/axlsx/util/simple_typed_list.rb
index 5a15ddff..98c67d6b 100644
--- a/lib/axlsx/util/simple_typed_list.rb
+++ b/lib/axlsx/util/simple_typed_list.rb
@@ -43,7 +43,7 @@ module Axlsx
result = Array.new(max_column_count) { Array.new(row_count) }
# yes, I know it is silly, but that warning is really annoying
row_count.times do |row_index|
- max_column_count.times do |column_index|
+ max_column_count.times do |column_index|
datum = if @list[row_index].cells.size >= max_column_count
@list[row_index].cells[column_index]
elsif block_given?
diff --git a/lib/axlsx/workbook/worksheet/worksheet.rb b/lib/axlsx/workbook/worksheet/worksheet.rb
index 9a9c4506..2ab01862 100644
--- a/lib/axlsx/workbook/worksheet/worksheet.rb
+++ b/lib/axlsx/workbook/worksheet/worksheet.rb
@@ -721,7 +721,7 @@ module Axlsx
end
def outline(collection, range, level = 1, collapsed = true)
- range.each do |index|
+ range.each do |index|
unless (item = collection[index]).nil?
item.outline_level = level
item.hidden = collapsed
diff --git a/test/workbook/tc_defined_name.rb b/test/workbook/tc_defined_name.rb
index 2d3ff0d9..aa4f84e1 100644
--- a/test/workbook/tc_defined_name.rb
+++ b/test/workbook/tc_defined_name.rb
@@ -17,11 +17,10 @@ class TestDefinedNames < Test::Unit::TestCase
end
def test_boolean_attributes
- %w(workbook_parameter publish_to_server xlm vb_proceedure function hidden).each do |attr|
+ %w(workbook_parameter publish_to_server xlm vb_proceedure function hidden).each do |attr|
assert_raise(ArgumentError, 'only booleanish allowed in string attributes') { @dn.send("#{attr}=", 'foo') }
assert_nothing_raised { @dn.send("#{attr}=", 1) }
end
-
end
def test_local_sheet_id
diff --git a/test/workbook/worksheet/tc_header_footer.rb b/test/workbook/worksheet/tc_header_footer.rb
index bba879a1..fb95d7bf 100644
--- a/test/workbook/worksheet/tc_header_footer.rb
+++ b/test/workbook/worksheet/tc_header_footer.rb
@@ -59,7 +59,7 @@ class TestHeaderFooter < Test::Unit::TestCase
end
def test_boolean_attributes
- %w(different_first different_odd_even).each do |attr|
+ %w(different_first different_odd_even).each do |attr|
assert_raise(ArgumentError, 'only booleanish allowed in string attributes') { @hf.send("#{attr}=", 'foo') }
assert_nothing_raised { @hf.send("#{attr}=", 1) }
end