diff options
| author | Geremia Taglialatela <[email protected]> | 2023-04-09 16:47:12 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-04-09 16:47:12 +0200 |
| commit | 3befab6f5713c537f6b90b51c02882273c7f7cc9 (patch) | |
| tree | 44154a028654c8c9989a087052cf5e7641d31f1e | |
| parent | 48f392fb7752f14153126e9d154b4f9e2eef8fa7 (diff) | |
| download | caxlsx-3befab6f5713c537f6b90b51c02882273c7f7cc9.tar.gz caxlsx-3befab6f5713c537f6b90b51c02882273c7f7cc9.zip | |
Fix Layout/ArgumentAlignment offenses
```
rubocop --only Layout/ArgumentAlignment -a
```
| -rw-r--r-- | .rubocop_todo.yml | 14 | ||||
| -rw-r--r-- | lib/axlsx/drawing/picture_locking.rb | 4 | ||||
| -rw-r--r-- | lib/axlsx/package.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/workbook/defined_name.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/workbook/worksheet/sheet_format_pr.rb | 4 | ||||
| -rw-r--r-- | lib/axlsx/workbook/worksheet/sheet_protection.rb | 8 | ||||
| -rw-r--r-- | lib/axlsx/workbook/worksheet/sheet_view.rb | 8 | ||||
| -rw-r--r-- | lib/axlsx/workbook/worksheet/table_style_info.rb | 2 |
8 files changed, 15 insertions, 29 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f0d4799e..0679bf1a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -22,20 +22,6 @@ Gemspec/RequireMFA: Exclude: - 'axlsx.gemspec' -# Offense count: 15 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnforcedStyle, IndentationWidth. -# SupportedStyles: with_first_argument, with_fixed_indentation -Layout/ArgumentAlignment: - Exclude: - - 'lib/axlsx/drawing/picture_locking.rb' - - 'lib/axlsx/package.rb' - - 'lib/axlsx/workbook/defined_name.rb' - - 'lib/axlsx/workbook/worksheet/sheet_format_pr.rb' - - 'lib/axlsx/workbook/worksheet/sheet_protection.rb' - - 'lib/axlsx/workbook/worksheet/sheet_view.rb' - - 'lib/axlsx/workbook/worksheet/table_style_info.rb' - # Offense count: 58 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment. diff --git a/lib/axlsx/drawing/picture_locking.rb b/lib/axlsx/drawing/picture_locking.rb index 2e68a957..efd85f97 100644 --- a/lib/axlsx/drawing/picture_locking.rb +++ b/lib/axlsx/drawing/picture_locking.rb @@ -6,8 +6,8 @@ module Axlsx include Axlsx::Accessors boolean_attr_accessor :noGrp, :noSelect, :noRot, :noChangeAspect, - :noMove, :noResize, :noEditPoints, :noAdjustHandles, - :noChangeArrowheads, :noChangeShapeType + :noMove, :noResize, :noEditPoints, :noAdjustHandles, + :noChangeArrowheads, :noChangeShapeType serializable_attributes :noGrp, :noSelect, :noRot, :noChangeAspect, :noMove, :noResize, :noEditPoints, :noAdjustHandles, diff --git a/lib/axlsx/package.rb b/lib/axlsx/package.rb index a0a77949..ecab1c3d 100644 --- a/lib/axlsx/package.rb +++ b/lib/axlsx/package.rb @@ -323,7 +323,7 @@ module Axlsx workbook.worksheets.each do |sheet| c_types << Axlsx::Override.new(:PartName => "/xl/#{sheet.pn}", - :ContentType => WORKSHEET_CT) + :ContentType => WORKSHEET_CT) end exts = workbook.images.map { |image| image.extname.downcase } exts.uniq.each do |ext| diff --git a/lib/axlsx/workbook/defined_name.rb b/lib/axlsx/workbook/defined_name.rb index 6fe1f6e9..2632e8ef 100644 --- a/lib/axlsx/workbook/defined_name.rb +++ b/lib/axlsx/workbook/defined_name.rb @@ -116,7 +116,7 @@ module Axlsx boolean_attr_accessor :workbook_parameter, :publish_to_server, :xlm, :vb_proceedure, :function, :hidden serializable_attributes :short_cut_key, :status_bar, :help, :description, :custom_menu, :comment, - :workbook_parameter, :publish_to_server, :xlm, :vb_proceedure, :function, :hidden, :local_sheet_id + :workbook_parameter, :publish_to_server, :xlm, :vb_proceedure, :function, :hidden, :local_sheet_id def to_xml_string(str = '') raise ArgumentError, 'you must specify the name for this defined name. Please read the documentation for Axlsx::DefinedName for more details' unless name diff --git a/lib/axlsx/workbook/worksheet/sheet_format_pr.rb b/lib/axlsx/workbook/worksheet/sheet_format_pr.rb index 5e06ca5b..ad4e4fab 100644 --- a/lib/axlsx/workbook/worksheet/sheet_format_pr.rb +++ b/lib/axlsx/workbook/worksheet/sheet_format_pr.rb @@ -34,8 +34,8 @@ module Axlsx end serializable_attributes :base_col_width, :default_col_width, :default_row_height, - :custom_height, :zero_height, :thick_top, :thick_bottom, - :outline_level_row, :outline_level_col + :custom_height, :zero_height, :thick_top, :thick_bottom, + :outline_level_row, :outline_level_col float_attr_accessor :default_col_width, :default_row_height diff --git a/lib/axlsx/workbook/worksheet/sheet_protection.rb b/lib/axlsx/workbook/worksheet/sheet_protection.rb index 68202f08..b36f8875 100644 --- a/lib/axlsx/workbook/worksheet/sheet_protection.rb +++ b/lib/axlsx/workbook/worksheet/sheet_protection.rb @@ -31,12 +31,12 @@ module Axlsx end boolean_attr_accessor :sheet, :objects, :scenarios, :format_cells, :format_columns, :format_rows, - :insert_columns, :insert_rows, :insert_hyperlinks, :delete_columns, :delete_rows, - :select_locked_cells, :sort, :auto_filter, :pivot_tables, :select_unlocked_cells + :insert_columns, :insert_rows, :insert_hyperlinks, :delete_columns, :delete_rows, + :select_locked_cells, :sort, :auto_filter, :pivot_tables, :select_unlocked_cells serializable_attributes :sheet, :objects, :scenarios, :format_cells, :format_columns, :format_rows, - :insert_columns, :insert_rows, :insert_hyperlinks, :delete_columns, :delete_rows, - :select_locked_cells, :sort, :auto_filter, :pivot_tables, :select_unlocked_cells, :salt, :password + :insert_columns, :insert_rows, :insert_hyperlinks, :delete_columns, :delete_rows, + :select_locked_cells, :sort, :auto_filter, :pivot_tables, :select_unlocked_cells, :salt, :password # Specifies the salt which was prepended to the user-supplied password before it was hashed using the hashing algorithm # @return [String] diff --git a/lib/axlsx/workbook/worksheet/sheet_view.rb b/lib/axlsx/workbook/worksheet/sheet_view.rb index ab66f800..8c2a0cd5 100644 --- a/lib/axlsx/workbook/worksheet/sheet_view.rb +++ b/lib/axlsx/workbook/worksheet/sheet_view.rb @@ -40,12 +40,12 @@ module Axlsx end boolean_attr_accessor :default_grid_color, :right_to_left, :show_formulas, :show_grid_lines, - :show_row_col_headers, :show_ruler, :show_white_space, :show_zeros, :tab_selected, :window_protection, :show_outline_symbols + :show_row_col_headers, :show_ruler, :show_white_space, :show_zeros, :tab_selected, :window_protection, :show_outline_symbols serializable_attributes :default_grid_color, :right_to_left, :show_formulas, :show_grid_lines, - :show_row_col_headers, :show_ruler, :show_white_space, :show_zeros, :tab_selected, :window_protection, :show_outline_symbols, - :zoom_scale_sheet_layout_view, :zoom_scale_page_layout_view, :zoom_scale_normal, :workbook_view_id, - :view, :top_left_cell, :color_id, :zoom_scale + :show_row_col_headers, :show_ruler, :show_white_space, :show_zeros, :tab_selected, :window_protection, :show_outline_symbols, + :zoom_scale_sheet_layout_view, :zoom_scale_page_layout_view, :zoom_scale_normal, :workbook_view_id, + :view, :top_left_cell, :color_id, :zoom_scale # instance values that must be serialized as their own elements - e.g. not attributes. CHILD_ELEMENTS = [:pane, :selections] diff --git a/lib/axlsx/workbook/worksheet/table_style_info.rb b/lib/axlsx/workbook/worksheet/table_style_info.rb index f7b7bff4..537b2eea 100644 --- a/lib/axlsx/workbook/worksheet/table_style_info.rb +++ b/lib/axlsx/workbook/worksheet/table_style_info.rb @@ -26,7 +26,7 @@ module Axlsx # boolean attributes for this object boolean_attr_accessor :show_first_column, :show_last_column, :show_row_stripes, :show_column_stripes serializable_attributes :show_first_column, :show_last_column, :show_row_stripes, :show_column_stripes, - :name + :name # Initialize all the values to false as Excel requires them to # explicitly be disabled or all will show. |
