lib/roo/excelx/cell/number.rb

Summary

Maintainability
A
3 hrs
Test Coverage

Method generate_formatter has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        def generate_formatter(format)
          # FIXME: numbers can be other colors besides red:
          # [BLACK], [BLUE], [CYAN], [GREEN], [MAGENTA], [RED], [WHITE], [YELLOW], [COLOR n]
          case format
          when /^General$/i then '%.0f'
Severity: Minor
Found in lib/roo/excelx/cell/number.rb - About 1 hr to fix

    Method initialize has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            def initialize(value, formula, excelx_type, style, link, coordinate)
    Severity: Minor
    Found in lib/roo/excelx/cell/number.rb - About 45 mins to fix

      Method create_numeric has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

              def create_numeric(number)
                return number if Excelx::ERROR_VALUES.include?(number)
                case @format
                when /%/
                  Float(number)
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb - About 25 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Method number_format has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

              def number_format(formatter, negative_formatter = nil)
                proc do |number|
                  if negative_formatter
                    formatter = number.to_i > 0 ? formatter : negative_formatter
                    number = number.to_f.abs
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb - About 25 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      FIXME found
      Open

              # FIXME: change default_type to number. This will break brittle tests.
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by fixme

      FIXME found
      Open

                # FIXME: numbers can be other colors besides red:
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by fixme

      FIXME found
      Open

                # FIXME: Excelx_type is an array, but the first value isn't used.
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by fixme

      FIXME found
      Open

                  # FIXME: not quite sure what the format should look like in this case.
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by fixme

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when /^General$/i then '%.0f'
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '0.00E+00' then '%.2E'
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '0%'
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '#,##0.00;(#,##0.00)' then number_format('%.2f', '(%.2f)')
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '@' then proc { |number| number }
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '#,##0 ;(#,##0)' then number_format('%.0f', '(%.0f)')
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '#,##0 ;[Red](#,##0)' then number_format('%.0f', '[Red](%.0f)')
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '#,##0.00;(#,##0.00)' then number_format('%.2f', '(%.2f)')
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when "_-* #,##0.00\\ _€_-;\\-* #,##0.00\\ _€_-;_-* \"-\"??\\ _€_-;_-@_-" then number_format('%.2f', '-%.2f')
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                    Kernel.format('%.0f%%', number.to_f * 100)
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                    Kernel.format('%.2f%%', number.to_f * 100)
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '#,##0 ;(#,##0)' then number_format('%.0f', '(%.0f)')
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '#,##0 ;[Red](#,##0)' then number_format('%.0f', '[Red](%.0f)')
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '#,##0.00;[Red](#,##0.00)' then number_format('%.2f', '[Red](%.2f)')
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '#,##0 ;[Red](#,##0)' then number_format('%.0f', '[Red](%.0f)')
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                  (number.include?('.') || (/\A[-+]?\d+E[-+]?\d+\z/i =~ number)) ? Float(number) : Integer(number, 10)
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '0.00E+00' then '%.2E'
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '#,##0.00;(#,##0.00)' then number_format('%.2f', '(%.2f)')
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '#,##0' then number_format('%.0f')
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '#,##0' then number_format('%.0f')
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '0.00%'
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '#,##0.00;[Red](#,##0.00)' then number_format('%.2f', '[Red](%.2f)')
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '##0.0E+0' then '%.1E'
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '0' then '%.0f'
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '##0.0E+0' then '%.1E'
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '#,##0.00;[Red](#,##0.00)' then number_format('%.2f', '[Red](%.2f)')
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '0' then '%.0f'
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when '#,##0 ;(#,##0)' then number_format('%.0f', '(%.0f)')
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
      Open

                when "_-* #,##0.00\\ _€_-;\\-* #,##0.00\\ _€_-;_-* \"-\"??\\ _€_-;_-@_-" then number_format('%.2f', '-%.2f')
      Severity: Minor
      Found in lib/roo/excelx/cell/number.rb by rubocop

      Checks if uses of quotes match the configured preference.

      Example: EnforcedStyle: single_quotes (default)

      # bad
      "No special symbols"
      "No string interpolation"
      "Just text"
      
      # good
      'No special symbols'
      'No string interpolation'
      'Just text'
      "Wait! What's #{this}!"

      Example: EnforcedStyle: double_quotes

      # bad
      'Just some text'
      'No special chars or interpolation'
      
      # good
      "Just some text"
      "No special chars or interpolation"
      "Every string in #{project} uses double_quotes"

      There are no issues that match your filters.

      Category
      Status