lib/roo/excelx/cell/base.rb

Summary

Maintainability
A
1 hr
Test Coverage

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/base.rb - About 45 mins to fix

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

            def initialize(value, formula, excelx_type, style, link, coordinate)
              @cell_value = value
              @cell_type = excelx_type if excelx_type
              @formula = formula if formula
              @style = style unless style == 1
    Severity: Minor
    Found in lib/roo/excelx/cell/base.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: I think style should be deprecated. Having a style attribute
    Severity: Minor
    Found in lib/roo/excelx/cell/base.rb by fixme

    FIXME found
    Open

            # FIXME: Updating a cell's value should be able tochange the cell's type,
    Severity: Minor
    Found in lib/roo/excelx/cell/base.rb by fixme

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

              warn '[DEPRECATION] `link` is deprecated.  Please use `link?` instead.'
    Severity: Minor
    Found in lib/roo/excelx/cell/base.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

              warn '[DEPRECATION] `excelx_type` is deprecated.  Please use `cell_type` instead.'
    Severity: Minor
    Found in lib/roo/excelx/cell/base.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

              warn '[DEPRECATION] `excelx_value` is deprecated.  Please use `cell_value` instead.'
    Severity: Minor
    Found in lib/roo/excelx/cell/base.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

              warn '[DEPRECATION] `hyperlink` is deprecated.  Please use `link?` instead.'
    Severity: Minor
    Found in lib/roo/excelx/cell/base.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