diff options
| author | Geremia Taglialatela <[email protected]> | 2023-04-07 23:50:27 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-04-07 23:50:27 +0200 |
| commit | ab7ef765bada307754b50c17fa63b5ae353a57fa (patch) | |
| tree | b1e35447ad159da19501b1d8d2ac429d1ae48000 | |
| parent | 1534eba0300a256a827990ba12f3297c5eda3514 (diff) | |
| download | caxlsx-ab7ef765bada307754b50c17fa63b5ae353a57fa.tar.gz caxlsx-ab7ef765bada307754b50c17fa63b5ae353a57fa.zip | |
Fix Layout/SpaceAroundKeyword offenses
```
rubocop --only Layout/SpaceAroundKeyword -a
```
| -rw-r--r-- | .rubocop_todo.yml | 7 | ||||
| -rw-r--r-- | lib/axlsx/package.rb | 2 | ||||
| -rw-r--r-- | lib/axlsx/workbook/worksheet/cell.rb | 2 |
3 files changed, 2 insertions, 9 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 9d8e7434..eeb87828 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -162,13 +162,6 @@ Layout/SpaceAfterComma: Layout/SpaceAroundEqualsInParameterDefault: Enabled: false -# Offense count: 2 -# This cop supports safe autocorrection (--autocorrect). -Layout/SpaceAroundKeyword: - Exclude: - - 'lib/axlsx/package.rb' - - 'lib/axlsx/workbook/worksheet/cell.rb' - # Offense count: 343 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator. diff --git a/lib/axlsx/package.rb b/lib/axlsx/package.rb index ed73397a..5bd8d5c2 100644 --- a/lib/axlsx/package.rb +++ b/lib/axlsx/package.rb @@ -233,7 +233,7 @@ module Axlsx parts << {:entry => "xl/#{cache_definition.pn}", :doc => cache_definition} #, :schema => SML_XSD} end - workbook.comments.each do|comment| + workbook.comments.each do |comment| if comment.size > 0 parts << { :entry => "xl/#{comment.pn}", :doc => comment, :schema => SML_XSD } parts << { :entry => "xl/#{comment.vml_drawing.pn}", :doc => comment.vml_drawing, :schema => nil } diff --git a/lib/axlsx/workbook/worksheet/cell.rb b/lib/axlsx/workbook/worksheet/cell.rb index f52006bd..24865b4d 100644 --- a/lib/axlsx/workbook/worksheet/cell.rb +++ b/lib/axlsx/workbook/worksheet/cell.rb @@ -366,7 +366,7 @@ module Axlsx def merge(target) start, stop = if target.is_a?(String) [self.r, target] - elsif(target.is_a?(Cell)) + elsif target.is_a?(Cell) Axlsx.sort_cells([self, target]).map { |c| c.r } end self.row.worksheet.merge_cells "#{start}:#{stop}" unless stop.nil? |
