openxml/openxml-drawingml

View on GitHub

Showing 29 of 29 total issues

Method ok_values has 187 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def ok_values
%i( accentBorderCallout1
accentBorderCallout2
accentBorderCallout3
accentCallout1
Severity: Major
Found in lib/openxml/drawingml/elements/preset_geometry.rb - About 7 hrs to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    PRESET_GEOMETRIES = %i{
    accentBorderCallout1 accentBorderCallout2 accentBorderCallout3
    accentCallout1 accentCallout2 accentCallout3 actionButtonBackPrevious
    actionButtonBeginning actionButtonBlank actionButtonDocument
    actionButtonEnd actionButtonForwardNext actionButtonHelp
    Severity: Major
    Found in lib/openxml/drawingml/properties/preset_geometry.rb and 1 other location - About 5 hrs to fix
    lib/openxml/drawingml/elements/preset_geometry.rb on lines 19..205

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    %i( accentBorderCallout1
    accentBorderCallout2
    accentBorderCallout3
    accentCallout1
    accentCallout2
    Severity: Major
    Found in lib/openxml/drawingml/elements/preset_geometry.rb and 1 other location - About 5 hrs to fix
    lib/openxml/drawingml/properties/preset_geometry.rb on lines 9..49

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    module DrawingML
    module Properties
    class PictureLocks < OpenXml::Properties::ComplexProperty
    include OpenXml::ContainsProperties
    namespace :a
    Severity: Major
    Found in lib/openxml/drawingml/properties/picture_locks.rb and 1 other location - About 2 hrs to fix
    lib/openxml/drawingml/properties/shape_locks.rb on lines 2..22

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    module DrawingML
    module Properties
    class ShapeLocks < OpenXml::Properties::ComplexProperty
    include OpenXml::ContainsProperties
    namespace :a
    Severity: Major
    Found in lib/openxml/drawingml/properties/shape_locks.rb and 1 other location - About 2 hrs to fix
    lib/openxml/drawingml/properties/picture_locks.rb on lines 2..22

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    module DrawingML
    module Elements
    class TailEnd < OpenXml::Element
    namespace :a
    tag :tailEnd
    Severity: Major
    Found in lib/openxml/drawingml/elements/tail_end.rb and 1 other location - About 2 hrs to fix
    lib/openxml/drawingml/elements/head_end.rb on lines 2..23

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    module DrawingML
    module Elements
    class HeadEnd < OpenXml::Element
    namespace :a
    tag :headEnd
    Severity: Major
    Found in lib/openxml/drawingml/elements/head_end.rb and 1 other location - About 2 hrs to fix
    lib/openxml/drawingml/elements/tail_end.rb on lines 2..23

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    AUTONUMBER_SCHEMES = %i{
    alphaLcParenBoth alphaLcParenR alphaLcPeriod alphaUcParenBoth
    alphaUcParenR alphaUcPeriod arabic1Minus arabic2Minus
    arabicDbPeriod arabicDbPlain arabicParenBoth arabicParenR
    arabicPeriod arabicPlain circleNumDbPlain circleNumWdBlackPlain
    Severity: Minor
    Found in lib/openxml/drawingml/properties/bullet_style_auto_numbered.rb and 1 other location - About 45 mins to fix
    lib/openxml/drawingml/elements/preset_text_warp.rb on lines 9..22

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    attribute :preset, one_of: %i(textArchDown textArchDownPour textArchUp
    textArchUpPour textButton textButtonPour
    textCanDown textCanUp textCascadeDown
    textCascadeUp textChevron textChevronInverted
    textCircle textCirclePour textCurveDown
    Severity: Minor
    Found in lib/openxml/drawingml/elements/preset_text_warp.rb and 1 other location - About 45 mins to fix
    lib/openxml/drawingml/properties/bullet_style_auto_numbered.rb on lines 8..18

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    module DrawingML
    module Elements
    class SourceRectangle < OpenXml::Element
    namespace :a
    tag :srcRect
    Severity: Minor
    Found in lib/openxml/drawingml/elements/source_rectangle.rb and 1 other location - About 40 mins to fix
    lib/openxml/drawingml/elements/fill_rectangle.rb on lines 2..13

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    module DrawingML
    module Elements
    class FillRectangle < OpenXml::Element
    namespace :a
    tag :fillRect
    Severity: Minor
    Found in lib/openxml/drawingml/elements/fill_rectangle.rb and 1 other location - About 40 mins to fix
    lib/openxml/drawingml/elements/source_rectangle.rb on lines 2..13

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    property_choice do
    value_property :no_fill, as: :fill_none
    property :solid_fill, as: :fill_solid
    property :gradient_fill, as: :fill_gradient
    property :pattern_fill, as: :fill_pattern
    Severity: Major
    Found in lib/openxml/drawingml/properties/underline_fill.rb and 5 other locations - About 30 mins to fix
    lib/openxml/drawingml/elements/line_break.rb on lines 48..55
    lib/openxml/drawingml/elements/run.rb on lines 44..51
    lib/openxml/drawingml/properties/color_container_property.rb on lines 5..12
    lib/openxml/drawingml/properties/run_properties.rb on lines 37..44
    lib/openxml/drawingml/properties/shape_properties.rb on lines 22..29

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    property_choice do
    value_property :no_fill, as: :fill_none
    property :solid_fill, as: :fill_solid
    property :gradient_fill, as: :fill_gradient
    property :pattern_fill, as: :fill_pattern
    Severity: Major
    Found in lib/openxml/drawingml/properties/run_properties.rb and 5 other locations - About 30 mins to fix
    lib/openxml/drawingml/elements/line_break.rb on lines 48..55
    lib/openxml/drawingml/elements/run.rb on lines 44..51
    lib/openxml/drawingml/properties/color_container_property.rb on lines 5..12
    lib/openxml/drawingml/properties/shape_properties.rb on lines 22..29
    lib/openxml/drawingml/properties/underline_fill.rb on lines 8..15

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    property_choice do
    value_property :no_fill, as: :fill_none
    property :solid_fill, as: :fill_solid
    property :gradient_fill, as: :fill_gradient
    property :pattern_fill, as: :fill_pattern
    Severity: Major
    Found in lib/openxml/drawingml/properties/shape_properties.rb and 5 other locations - About 30 mins to fix
    lib/openxml/drawingml/elements/line_break.rb on lines 48..55
    lib/openxml/drawingml/elements/run.rb on lines 44..51
    lib/openxml/drawingml/properties/color_container_property.rb on lines 5..12
    lib/openxml/drawingml/properties/run_properties.rb on lines 37..44
    lib/openxml/drawingml/properties/underline_fill.rb on lines 8..15

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    property_choice do
    value_property :no_fill, as: :fill_none
    property :solid_fill, as: :fill_solid
    property :gradient_fill, as: :fill_gradient
    property :pattern_fill, as: :fill_pattern
    Severity: Major
    Found in lib/openxml/drawingml/elements/run.rb and 5 other locations - About 30 mins to fix
    lib/openxml/drawingml/elements/line_break.rb on lines 48..55
    lib/openxml/drawingml/properties/color_container_property.rb on lines 5..12
    lib/openxml/drawingml/properties/run_properties.rb on lines 37..44
    lib/openxml/drawingml/properties/shape_properties.rb on lines 22..29
    lib/openxml/drawingml/properties/underline_fill.rb on lines 8..15

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    property_choice do
    value_property :no_fill, as: :fill_none
    property :solid_fill, as: :fill_solid
    property :gradient_fill, as: :fill_gradient
    property :pattern_fill, as: :fill_pattern
    Severity: Major
    Found in lib/openxml/drawingml/elements/line_break.rb and 5 other locations - About 30 mins to fix
    lib/openxml/drawingml/elements/run.rb on lines 44..51
    lib/openxml/drawingml/properties/color_container_property.rb on lines 5..12
    lib/openxml/drawingml/properties/run_properties.rb on lines 37..44
    lib/openxml/drawingml/properties/shape_properties.rb on lines 22..29
    lib/openxml/drawingml/properties/underline_fill.rb on lines 8..15

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

    property_choice do
    property :component_rgb, as: :color_component_rgb
    value_property :rgb, as: :color_hex_rgb
    property :hsl, as: :color_hsl
    value_property :system_color, as: :color_system_color
    Severity: Major
    Found in lib/openxml/drawingml/properties/color_container_property.rb and 5 other locations - About 30 mins to fix
    lib/openxml/drawingml/elements/line_break.rb on lines 48..55
    lib/openxml/drawingml/elements/run.rb on lines 44..51
    lib/openxml/drawingml/properties/run_properties.rb on lines 37..44
    lib/openxml/drawingml/properties/shape_properties.rb on lines 22..29
    lib/openxml/drawingml/properties/underline_fill.rb on lines 8..15

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    text_margin = lambda do |value|
    message = "Invalid text margin: Must be an integer between 0 and 51,206,400 or include units"
    is_integer_in_range = value.is_a?(Integer) && (0..51_206_400).cover?(value)
    is_measure = value.is_a?(String) && value =~ OpenXml::DrawingML::ST_PositiveUniversalMeasure
    raise ArgumentError, message unless is_integer_in_range || is_measure
    Severity: Minor
    Found in lib/openxml/drawingml/elements/paragraph.rb and 1 other location - About 30 mins to fix
    lib/openxml/drawingml/elements/paragraph.rb on lines 18..23

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    indent_range = lambda do |value|
    message = "Invalid indentation range: Must be an integer between -51,206,400 and 51,206,400 or include units"
    is_integer_in_range = value.is_a?(Integer) && (-51_206_400..51_206_400).cover?(value)
    is_measure = value.is_a?(String) && value =~ OpenXml::DrawingML::ST_UniversalMeasure
    raise ArgumentError, message unless is_integer_in_range || is_measure
    Severity: Minor
    Found in lib/openxml/drawingml/elements/paragraph.rb and 1 other location - About 30 mins to fix
    lib/openxml/drawingml/elements/paragraph.rb on lines 25..30

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    module DrawingML
    module Properties
    class SpaceAfter < SimplePropertyContainerProperty
    namespace :a
    tag :spcAft
    Severity: Minor
    Found in lib/openxml/drawingml/properties/space_after.rb and 1 other location - About 30 mins to fix
    lib/openxml/drawingml/properties/space_before.rb on lines 2..16
    Severity
    Category
    Status
    Source
    Language