summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGeremia Taglialatela <[email protected]>2023-04-05 17:46:42 +0200
committerGeremia Taglialatela <[email protected]>2023-04-06 09:55:34 +0200
commit94813f5200da3f034af11b9537221e076de174a6 (patch)
treeebb358d150685836b916ca5b38a8a0a47bb9fbab
parenta802d1d179f5ab56b419e1b47e62885d72b5384d (diff)
downloadcaxlsx-94813f5200da3f034af11b9537221e076de174a6.tar.gz
caxlsx-94813f5200da3f034af11b9537221e076de174a6.zip
Fix Layout/CommentIndentation offenses
``` rubocop --only Layout/CommentIndentation -a ```
-rw-r--r--lib/axlsx/drawing/area_chart.rb2
-rw-r--r--lib/axlsx/drawing/line_chart.rb2
-rw-r--r--lib/axlsx/drawing/marker.rb2
-rw-r--r--lib/axlsx/drawing/num_data_source.rb2
-rw-r--r--lib/axlsx/stylesheet/cell_style.rb2
-rw-r--r--lib/axlsx/stylesheet/color.rb2
-rw-r--r--lib/axlsx/stylesheet/font.rb2
-rw-r--r--lib/axlsx/stylesheet/table_styles.rb2
-rw-r--r--lib/axlsx/stylesheet/xf.rb2
-rw-r--r--lib/axlsx/workbook/workbook.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/col.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/conditional_formatting.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/icon_set.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/page_setup.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/protected_range.rb2
-rw-r--r--lib/axlsx/workbook/worksheet/row.rb2
-rw-r--r--test/stylesheet/tc_font.rb26
-rw-r--r--test/workbook/worksheet/tc_date_time_converter.rb2
18 files changed, 30 insertions, 30 deletions
diff --git a/lib/axlsx/drawing/area_chart.rb b/lib/axlsx/drawing/area_chart.rb
index 1834292c..fa0f5ebf 100644
--- a/lib/axlsx/drawing/area_chart.rb
+++ b/lib/axlsx/drawing/area_chart.rb
@@ -34,7 +34,7 @@ module Axlsx
end
alias :valAxis :val_axis
- # must be one of [:percentStacked, :clustered, :standard, :stacked]
+ # must be one of [:percentStacked, :clustered, :standard, :stacked]
# @return [Symbol]
attr_reader :grouping
diff --git a/lib/axlsx/drawing/line_chart.rb b/lib/axlsx/drawing/line_chart.rb
index e1ded225..dd0517cb 100644
--- a/lib/axlsx/drawing/line_chart.rb
+++ b/lib/axlsx/drawing/line_chart.rb
@@ -34,7 +34,7 @@ module Axlsx
end
alias :valAxis :val_axis
- # must be one of [:percentStacked, :clustered, :standard, :stacked]
+ # must be one of [:percentStacked, :clustered, :standard, :stacked]
# @return [Symbol]
attr_reader :grouping
diff --git a/lib/axlsx/drawing/marker.rb b/lib/axlsx/drawing/marker.rb
index 7ef77f21..d884ef3c 100644
--- a/lib/axlsx/drawing/marker.rb
+++ b/lib/axlsx/drawing/marker.rb
@@ -32,7 +32,7 @@ module Axlsx
# @return [Integer]
attr_reader :rowOff
- # @see col
+ # @see col
def col=(v) Axlsx::validate_unsigned_int v; @col = v end
# @see colOff
def colOff=(v) Axlsx::validate_int v; @colOff = v end
diff --git a/lib/axlsx/drawing/num_data_source.rb b/lib/axlsx/drawing/num_data_source.rb
index 028b75d2..87caac2a 100644
--- a/lib/axlsx/drawing/num_data_source.rb
+++ b/lib/axlsx/drawing/num_data_source.rb
@@ -35,7 +35,7 @@ module Axlsx
[:yVal, :val, :bubbleSize]
end
- # sets the tag name for this data source
+ # sets the tag name for this data source
# @param [Symbol] v One of the allowed_tag_names
def tag_name=(v)
Axlsx::RestrictionValidator.validate "#{self.class.name}.tag_name", self.class.allowed_tag_names, v
diff --git a/lib/axlsx/stylesheet/cell_style.rb b/lib/axlsx/stylesheet/cell_style.rb
index e1d4e0ff..9297e243 100644
--- a/lib/axlsx/stylesheet/cell_style.rb
+++ b/lib/axlsx/stylesheet/cell_style.rb
@@ -46,7 +46,7 @@ module Axlsx
# @return [Boolean]
attr_reader :customBuiltin
- # @see name
+ # @see name
def name=(v) Axlsx::validate_string v; @name = v end
# @see xfId
def xfId=(v) Axlsx::validate_unsigned_int v; @xfId = v end
diff --git a/lib/axlsx/stylesheet/color.rb b/lib/axlsx/stylesheet/color.rb
index d7168ee7..e4051e96 100644
--- a/lib/axlsx/stylesheet/color.rb
+++ b/lib/axlsx/stylesheet/color.rb
@@ -45,7 +45,7 @@ module Axlsx
# @return [Float]
attr_reader :tint
- # @see auto
+ # @see auto
def auto=(v) Axlsx::validate_boolean v; @auto = v end
# @see color
diff --git a/lib/axlsx/stylesheet/font.rb b/lib/axlsx/stylesheet/font.rb
index 4011f888..890957c5 100644
--- a/lib/axlsx/stylesheet/font.rb
+++ b/lib/axlsx/stylesheet/font.rb
@@ -109,7 +109,7 @@ module Axlsx
# @return [Integer]
attr_reader :sz
- # @see name
+ # @see name
def name=(v) Axlsx::validate_string v; @name = v end
# @see charset
def charset=(v) Axlsx::validate_unsigned_int v; @charset = v end
diff --git a/lib/axlsx/stylesheet/table_styles.rb b/lib/axlsx/stylesheet/table_styles.rb
index f6c6a415..d10e9b05 100644
--- a/lib/axlsx/stylesheet/table_styles.rb
+++ b/lib/axlsx/stylesheet/table_styles.rb
@@ -24,7 +24,7 @@ module Axlsx
# @return [String]
attr_reader :defaultPivotStyle
- # @see defaultTableStyle
+ # @see defaultTableStyle
def defaultTableStyle=(v) Axlsx::validate_string(v); @defaultTableStyle = v; end
# @see defaultPivotStyle
def defaultPivotStyle=(v) Axlsx::validate_string(v); @defaultPivotStyle = v; end
diff --git a/lib/axlsx/stylesheet/xf.rb b/lib/axlsx/stylesheet/xf.rb
index 9aaba6fa..13abf4f2 100644
--- a/lib/axlsx/stylesheet/xf.rb
+++ b/lib/axlsx/stylesheet/xf.rb
@@ -92,7 +92,7 @@ module Axlsx
# @return [Boolean]
attr_reader :applyProtection
- # @see Xf#alignment
+ # @see Xf#alignment
def alignment=(v) DataTypeValidator.validate "Xf.alignment", CellAlignment, v; @alignment = v end
# @see protection
diff --git a/lib/axlsx/workbook/workbook.rb b/lib/axlsx/workbook/workbook.rb
index b5d229e1..deb42d86 100644
--- a/lib/axlsx/workbook/workbook.rb
+++ b/lib/axlsx/workbook/workbook.rb
@@ -107,7 +107,7 @@ require 'axlsx/workbook/worksheet/selection.rb'
@is_reversed = v
end
- # A collection of worksheets associated with this workbook.
+ # A collection of worksheets associated with this workbook.
# @note The recommended way to manage worksheets is add_worksheet
# @see Workbook#add_worksheet
# @see Worksheet
diff --git a/lib/axlsx/workbook/worksheet/col.rb b/lib/axlsx/workbook/worksheet/col.rb
index ff4c67b9..29840c7a 100644
--- a/lib/axlsx/workbook/worksheet/col.rb
+++ b/lib/axlsx/workbook/worksheet/col.rb
@@ -105,7 +105,7 @@ module Axlsx
@style = v
end
- # @see Col#width
+ # @see Col#width
def width=(v)
# Removing this validation make a 10% difference in performance
# as it is called EVERY TIME A CELL IS ADDED - the proper solution
diff --git a/lib/axlsx/workbook/worksheet/conditional_formatting.rb b/lib/axlsx/workbook/worksheet/conditional_formatting.rb
index 0ed065e6..4fe6578d 100644
--- a/lib/axlsx/workbook/worksheet/conditional_formatting.rb
+++ b/lib/axlsx/workbook/worksheet/conditional_formatting.rb
@@ -28,7 +28,7 @@ module Axlsx
# @return [Array]
attr_reader :rules
- # Add Conditional Formatting Rules to this object. Rules can either
+ # Add Conditional Formatting Rules to this object. Rules can either
# be already created {ConditionalFormattingRule} elements or
# hashes of options for automatic creation. If rules is a hash
# instead of an array, assume only one rule being added.
diff --git a/lib/axlsx/workbook/worksheet/icon_set.rb b/lib/axlsx/workbook/worksheet/icon_set.rb
index 400a8c47..42afaa4d 100644
--- a/lib/axlsx/workbook/worksheet/icon_set.rb
+++ b/lib/axlsx/workbook/worksheet/icon_set.rb
@@ -47,7 +47,7 @@ module Axlsx
# @return [Boolean]
attr_reader :showValue
- # @see iconSet
+ # @see iconSet
def iconSet=(v); Axlsx::validate_icon_set(v); @iconSet = v end
# @see showValue
diff --git a/lib/axlsx/workbook/worksheet/page_setup.rb b/lib/axlsx/workbook/worksheet/page_setup.rb
index d7abcbc2..b3117942 100644
--- a/lib/axlsx/workbook/worksheet/page_setup.rb
+++ b/lib/axlsx/workbook/worksheet/page_setup.rb
@@ -190,7 +190,7 @@ module Axlsx
@paper_size = size
end
- # Set some or all page settings at once.
+ # Set some or all page settings at once.
# @param [Hash] options The page settings to set (possible keys are :fit_to_height, :fit_to_width, :orientation, :paper_height, :paper_width, and :scale).
def set(options)
parse_options options
diff --git a/lib/axlsx/workbook/worksheet/protected_range.rb b/lib/axlsx/workbook/worksheet/protected_range.rb
index 492b2254..e0da00df 100644
--- a/lib/axlsx/workbook/worksheet/protected_range.rb
+++ b/lib/axlsx/workbook/worksheet/protected_range.rb
@@ -7,7 +7,7 @@ module Axlsx
include Axlsx::OptionsParser
include Axlsx::SerializedAttributes
- # Initializes a new protected range object
+ # Initializes a new protected range object
# @option [String] sqref The cell range reference to protect. This can be an absolute or a relateve range however, it only applies to the current sheet.
# @option [String] name An optional name for the protected name.
def initialize(options={})
diff --git a/lib/axlsx/workbook/worksheet/row.rb b/lib/axlsx/workbook/worksheet/row.rb
index 4c8c27b7..376719ce 100644
--- a/lib/axlsx/workbook/worksheet/row.rb
+++ b/lib/axlsx/workbook/worksheet/row.rb
@@ -11,7 +11,7 @@ module Axlsx
# thickTop
# thickBottom
- # Creates a new row. New Cell objects are created based on the values, types and style options.
+ # Creates a new row. New Cell objects are created based on the values, types and style options.
# A new cell is created for each item in the values array. style and types options are applied as follows:
# If the types option is defined and is a symbol it is applied to all the cells created.
# If the types option is an array, cell types are applied by index for each cell
diff --git a/test/stylesheet/tc_font.rb b/test/stylesheet/tc_font.rb
index 106cfce5..aaa72aa0 100644
--- a/test/stylesheet/tc_font.rb
+++ b/test/stylesheet/tc_font.rb
@@ -25,42 +25,42 @@ class TestFont < Test::Unit::TestCase
assert_equal(@item.sz, nil)
end
- # def name=(v) Axlsx::validate_string v; @name = v end
+ # def name=(v) Axlsx::validate_string v; @name = v end
def test_name
assert_raise(ArgumentError) { @item.name = 7 }
assert_nothing_raised { @item.name = "bob" }
assert_equal(@item.name, "bob")
end
- # def charset=(v) Axlsx::validate_unsigned_int v; @charset = v end
+ # def charset=(v) Axlsx::validate_unsigned_int v; @charset = v end
def test_charset
assert_raise(ArgumentError) { @item.charset = -7 }
assert_nothing_raised { @item.charset = 5 }
assert_equal(@item.charset, 5)
end
- # def family=(v) Axlsx::validate_unsigned_int v; @family = v end
+ # def family=(v) Axlsx::validate_unsigned_int v; @family = v end
def test_family
assert_raise(ArgumentError) { @item.family = -7 }
assert_nothing_raised { @item.family = 5 }
assert_equal(@item.family, 5)
end
- # def b=(v) Axlsx::validate_boolean v; @b = v end
+ # def b=(v) Axlsx::validate_boolean v; @b = v end
def test_b
assert_raise(ArgumentError) { @item.b = -7 }
assert_nothing_raised { @item.b = true }
assert_equal(@item.b, true)
end
- # def i=(v) Axlsx::validate_boolean v; @i = v end
+ # def i=(v) Axlsx::validate_boolean v; @i = v end
def test_i
assert_raise(ArgumentError) { @item.i = -7 }
assert_nothing_raised { @item.i = true }
assert_equal(@item.i, true)
end
- # def u=(v) Axlsx::validate_cell_u v; @u = v end
+ # def u=(v) Axlsx::validate_cell_u v; @u = v end
def test_u
assert_raise(ArgumentError) { @item.u = -7 }
assert_nothing_raised { @item.u = :single }
@@ -79,49 +79,49 @@ class TestFont < Test::Unit::TestCase
assert_equal(@item.u, :none)
end
- # def strike=(v) Axlsx::validate_boolean v; @strike = v end
+ # def strike=(v) Axlsx::validate_boolean v; @strike = v end
def test_strike
assert_raise(ArgumentError) { @item.strike = -7 }
assert_nothing_raised { @item.strike = true }
assert_equal(@item.strike, true)
end
- # def outline=(v) Axlsx::validate_boolean v; @outline = v end
+ # def outline=(v) Axlsx::validate_boolean v; @outline = v end
def test_outline
assert_raise(ArgumentError) { @item.outline = -7 }
assert_nothing_raised { @item.outline = true }
assert_equal(@item.outline, true)
end
- # def shadow=(v) Axlsx::validate_boolean v; @shadow = v end
+ # def shadow=(v) Axlsx::validate_boolean v; @shadow = v end
def test_shadow
assert_raise(ArgumentError) { @item.shadow = -7 }
assert_nothing_raised { @item.shadow = true }
assert_equal(@item.shadow, true)
end
- # def condense=(v) Axlsx::validate_boolean v; @condense = v end
+ # def condense=(v) Axlsx::validate_boolean v; @condense = v end
def test_condense
assert_raise(ArgumentError) { @item.condense = -7 }
assert_nothing_raised { @item.condense = true }
assert_equal(@item.condense, true)
end
- # def extend=(v) Axlsx::validate_boolean v; @extend = v end
+ # def extend=(v) Axlsx::validate_boolean v; @extend = v end
def test_extend
assert_raise(ArgumentError) { @item.extend = -7 }
assert_nothing_raised { @item.extend = true }
assert_equal(@item.extend, true)
end
- # def color=(v) DataTypeValidator.validate "Font.color", Color, v; @color=v end
+ # def color=(v) DataTypeValidator.validate "Font.color", Color, v; @color=v end
def test_color
assert_raise(ArgumentError) { @item.color = -7 }
assert_nothing_raised { @item.color = Axlsx::Color.new(:rgb=>"00000000") }
assert(@item.color.is_a?(Axlsx::Color))
end
- # def sz=(v) Axlsx::validate_unsigned_int v; @sz=v end
+ # def sz=(v) Axlsx::validate_unsigned_int v; @sz=v end
def test_sz
assert_raise(ArgumentError) { @item.sz = -7 }
assert_nothing_raised { @item.sz = 5 }
diff --git a/test/workbook/worksheet/tc_date_time_converter.rb b/test/workbook/worksheet/tc_date_time_converter.rb
index d6b3fed2..19278e95 100644
--- a/test/workbook/worksheet/tc_date_time_converter.rb
+++ b/test/workbook/worksheet/tc_date_time_converter.rb
@@ -86,7 +86,7 @@ class TestDateTimeConverter < Test::Unit::TestCase
def test_time_to_serial_1904
Axlsx::Workbook.date1904 = true
- # ruby 1.8.7 cannot parse dates prior to epoch. see http://ruby-doc.org/core-1.8.7/Time.html
+ # ruby 1.8.7 cannot parse dates prior to epoch. see http://ruby-doc.org/core-1.8.7/Time.html
tests = if @extended_time_range
{ # examples taken straight from the spec