diff options
| author | Geremia Taglialatela <[email protected]> | 2023-04-07 23:53:12 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-04-07 23:53:12 +0200 |
| commit | 7ca771d9e05e76e3a1e69ecf5b51085e4dad2f9e (patch) | |
| tree | 24bbc1a02a4dd87be3f8f63ba8bbba362e8e52cb | |
| parent | 54e3784364712d87df5014767d417dd1d0ba1184 (diff) | |
| download | caxlsx-7ca771d9e05e76e3a1e69ecf5b51085e4dad2f9e.tar.gz caxlsx-7ca771d9e05e76e3a1e69ecf5b51085e4dad2f9e.zip | |
Fix Layout/SpaceInsideArrayLiteralBrackets offenses
```
rubocop --only Layout/SpaceInsideArrayLiteralBrackets -a
```
| -rw-r--r-- | .rubocop_todo.yml | 11 | ||||
| -rw-r--r-- | lib/axlsx/workbook/worksheet/data_validation.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/workbook/worksheet/sheet_view.rb | 2 | ||||
| -rw-r--r-- | test/workbook/worksheet/auto_filter/tc_filters.rb | 2 |
4 files changed, 3 insertions, 14 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 2f36309d..95ca7d1d 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -186,17 +186,6 @@ Layout/SpaceBeforeFirstArg: - 'lib/axlsx/workbook/workbook_view.rb' - 'test/workbook/worksheet/tc_worksheet.rb' -# Offense count: 5 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets. -# SupportedStyles: space, no_space, compact -# SupportedStylesForEmptyBrackets: space, no_space -Layout/SpaceInsideArrayLiteralBrackets: - Exclude: - - 'lib/axlsx/workbook/worksheet/data_validation.rb' - - 'lib/axlsx/workbook/worksheet/sheet_view.rb' - - 'test/workbook/worksheet/auto_filter/tc_filters.rb' - # Offense count: 139 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters. diff --git a/lib/axlsx/workbook/worksheet/data_validation.rb b/lib/axlsx/workbook/worksheet/data_validation.rb index 0cd28069..d4b86e20 100644 --- a/lib/axlsx/workbook/worksheet/data_validation.rb +++ b/lib/axlsx/workbook/worksheet/data_validation.rb @@ -247,7 +247,7 @@ module Axlsx private def get_valid_attributes - attributes = [:allowBlank, :error, :errorStyle, :errorTitle, :prompt, :promptTitle, :showErrorMessage, :showInputMessage, :sqref, :type ] + attributes = [:allowBlank, :error, :errorStyle, :errorTitle, :prompt, :promptTitle, :showErrorMessage, :showInputMessage, :sqref, :type] if [:whole, :decimal, :data, :time, :date, :textLength].include?(@type) attributes << [:operator, :formula1] diff --git a/lib/axlsx/workbook/worksheet/sheet_view.rb b/lib/axlsx/workbook/worksheet/sheet_view.rb index 0ca87b3b..104243ce 100644 --- a/lib/axlsx/workbook/worksheet/sheet_view.rb +++ b/lib/axlsx/workbook/worksheet/sheet_view.rb @@ -49,7 +49,7 @@ module Axlsx :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 ] + CHILD_ELEMENTS = [:pane, :selections] # The pane object for the sheet view # @return [Pane] diff --git a/test/workbook/worksheet/auto_filter/tc_filters.rb b/test/workbook/worksheet/auto_filter/tc_filters.rb index c7df0d57..d1c30446 100644 --- a/test/workbook/worksheet/auto_filter/tc_filters.rb +++ b/test/workbook/worksheet/auto_filter/tc_filters.rb @@ -3,7 +3,7 @@ require 'tc_helper.rb' class TestFilters < Test::Unit::TestCase def setup @filters = Axlsx::Filters.new(:filter_items => [1, 'a'], - :date_group_items =>[ { :date_time_grouping => :year, :year => 2011, :month => 11, :day => 11, :hour => 0, :minute => 0, :second => 0 } ], + :date_group_items =>[{ :date_time_grouping => :year, :year => 2011, :month => 11, :day => 11, :hour => 0, :minute => 0, :second => 0 }], :blank => true) end |
