lighttroupe/luz

View on GitHub

Showing 90 of 250 total issues

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

        self << (@halve_bpm_button = GuiButton.new.set(:scale_x => 1.0, :scale_y => 1.0, :offset_x => 0.0, :offset_y => 0.0, :background_image => $engine.load_image('images/buttons/halve.png'), :background_image_hover => $engine.load_image('images/buttons/halve-hover.png'), :background_image_click => $engine.load_image('images/buttons/halve-click.png')))
Severity: Major
Found in gui/gui_beat_monitor.rb and 13 other locations - About 20 mins to fix
gui/gui_beat_monitor.rb on lines 34..34
gui/gui_default.rb on lines 253..253
gui/gui_default.rb on lines 259..259
gui/gui_default.rb on lines 280..280
gui/gui_director_menu.rb on lines 24..24
gui/gui_director_menu.rb on lines 30..30
gui/gui_director_menu.rb on lines 35..35
gui/gui_directory_dialog.rb on lines 22..22
gui/gui_file_dialog.rb on lines 93..93
gui/gui_main_menu.rb on lines 13..13
gui/gui_main_menu.rb on lines 16..16
gui/gui_main_menu.rb on lines 39..39
gui/gui_main_menu.rb on lines 50..50

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        self << @add_button = GuiButton.new.set(:scale_x => 0.05, :scale_y => 0.06, :offset_x => -0.475, :offset_y => -0.47, :background_image => $engine.load_image('images/buttons/new-director.png'), :background_image_hover => $engine.load_image('images/buttons/new-director-hover.png'), :background_image_click => $engine.load_image('images/buttons/new-director-click.png'))
Severity: Major
Found in gui/gui_director_menu.rb and 13 other locations - About 20 mins to fix
gui/gui_beat_monitor.rb on lines 31..31
gui/gui_beat_monitor.rb on lines 34..34
gui/gui_default.rb on lines 253..253
gui/gui_default.rb on lines 259..259
gui/gui_default.rb on lines 280..280
gui/gui_director_menu.rb on lines 24..24
gui/gui_director_menu.rb on lines 35..35
gui/gui_directory_dialog.rb on lines 22..22
gui/gui_file_dialog.rb on lines 93..93
gui/gui_main_menu.rb on lines 13..13
gui/gui_main_menu.rb on lines 16..16
gui/gui_main_menu.rb on lines 39..39
gui/gui_main_menu.rb on lines 50..50

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        self << @save_button = GuiButton.new.set(:scale_x => 0.05, :scale_y => 0.06, :offset_x => 0.475, :offset_y => -0.47, :background_image => $engine.load_image('images/buttons/main-menu-save.png'), :background_image_hover => $engine.load_image('images/buttons/main-menu-save-hover.png'), :background_image_click => $engine.load_image('images/buttons/main-menu-save-click.png'))
Severity: Major
Found in gui/gui_main_menu.rb and 13 other locations - About 20 mins to fix
gui/gui_beat_monitor.rb on lines 31..31
gui/gui_beat_monitor.rb on lines 34..34
gui/gui_default.rb on lines 253..253
gui/gui_default.rb on lines 259..259
gui/gui_default.rb on lines 280..280
gui/gui_director_menu.rb on lines 24..24
gui/gui_director_menu.rb on lines 30..30
gui/gui_director_menu.rb on lines 35..35
gui/gui_directory_dialog.rb on lines 22..22
gui/gui_file_dialog.rb on lines 93..93
gui/gui_main_menu.rb on lines 13..13
gui/gui_main_menu.rb on lines 16..16
gui/gui_main_menu.rb on lines 50..50

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

                            i.distributed_among(number, 0.0..roll) { |roll_amount|
                                with_roll(roll_amount) {
                                    with_translation(0,0,(i.to_f/number) * height) {
                                        yield :child_index => i, :total_children => number
                                    }
Severity: Minor
Found in engine/plugins/actor_effects/spotlight.luz.rb and 1 other location - About 20 mins to fix
engine/plugins/actor_effects/stack.luz.rb on lines 13..17

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        self << @open_button = GuiButton.new.set(:scale_x => 0.05, :scale_y => 0.06, :offset_x => 0.475, :offset_y => 0.47, :background_image => $engine.load_image('images/buttons/main-menu-open.png'), :background_image_hover => $engine.load_image('images/buttons/main-menu-open-hover.png'), :background_image_click => $engine.load_image('images/buttons/main-menu-open-click.png'))
Severity: Major
Found in gui/gui_main_menu.rb and 13 other locations - About 20 mins to fix
gui/gui_beat_monitor.rb on lines 31..31
gui/gui_beat_monitor.rb on lines 34..34
gui/gui_default.rb on lines 253..253
gui/gui_default.rb on lines 259..259
gui/gui_default.rb on lines 280..280
gui/gui_director_menu.rb on lines 24..24
gui/gui_director_menu.rb on lines 30..30
gui/gui_director_menu.rb on lines 35..35
gui/gui_directory_dialog.rb on lines 22..22
gui/gui_file_dialog.rb on lines 93..93
gui/gui_main_menu.rb on lines 13..13
gui/gui_main_menu.rb on lines 39..39
gui/gui_main_menu.rb on lines 50..50

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        self << (@directors_button = GuiButton.new.set(:scale_x => -0.04, :scale_y => 0.06, :offset_x => 0.48, :offset_y => 0.47, :background_image => $engine.load_image('images/corner.png'), :background_image_hover => $engine.load_image('images/corner-hover.png'), :background_image_click => $engine.load_image('images/corner-click.png')))
Severity: Major
Found in gui/gui_default.rb and 13 other locations - About 20 mins to fix
gui/gui_beat_monitor.rb on lines 31..31
gui/gui_beat_monitor.rb on lines 34..34
gui/gui_default.rb on lines 253..253
gui/gui_default.rb on lines 280..280
gui/gui_director_menu.rb on lines 24..24
gui/gui_director_menu.rb on lines 30..30
gui/gui_director_menu.rb on lines 35..35
gui/gui_directory_dialog.rb on lines 22..22
gui/gui_file_dialog.rb on lines 93..93
gui/gui_main_menu.rb on lines 13..13
gui/gui_main_menu.rb on lines 16..16
gui/gui_main_menu.rb on lines 39..39
gui/gui_main_menu.rb on lines 50..50

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        self << (@cancel_text = GuiLabel.new.set({:color => [0.6,0.6,1.0], :string => 'play', :offset_x => -0.42, :offset_y => 0.48, :scale_x => 0.05, :scale_y => 0.04, :width => 4, :text_align => :fill}))
Severity: Minor
Found in gui/gui_main_menu.rb and 4 other locations - About 15 mins to fix
gui/gui_main_menu.rb on lines 29..29
gui/gui_main_menu.rb on lines 32..32
gui/gui_main_menu.rb on lines 33..33
gui/gui_main_menu.rb on lines 34..34

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    def from_rgb8(data, width, height)
        using {
            GL.TexImage2D(GL::TEXTURE_2D, mipmap=0, GL::RGBA, width, height, border=0, GL::RGB, GL::UNSIGNED_BYTE, data)
            yield if block_given?
        }
Severity: Minor
Found in utils/image.rb and 2 other locations - About 15 mins to fix
utils/image.rb on lines 86..91
utils/image.rb on lines 102..107

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        self << (@hint = GuiLabel.new.set({:width => 30, :lines => 3, :string => '', :color => [0.7,0.7,0.7], :offset_x => 0.19, :offset_y => -0.125, :scale_x => 0.58, :scale_y => 0.2}))
Severity: Minor
Found in gui/gui_add_window.rb and 1 other location - About 15 mins to fix
gui/gui_add_window.rb on lines 134..134

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        step = if direction == :up
            if value >= 1000.0 ; 1000.0 ; elsif value >= 100.0 ; 100.0 ; elsif value >= 10.0; 10.0 ; elsif value >= 1.0 ; 1.0 ; elsif value >= 0.1 ; 0.1 ; else ; 0.01 ; end
Severity: Minor
Found in gui/gui_float.rb and 1 other location - About 15 mins to fix
gui/gui_float.rb on lines 67..67

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        self << (@text3 = GuiLabel.new.set({:color => [1.0,0.5,0.5], :string => 'ian@openanswers.org', :offset_x => 0.0, :offset_y => -0.3, :scale_x => 0.3, :scale_y => 0.05, :width => 18, :text_align => :fill}))
Severity: Minor
Found in gui/gui_main_menu.rb and 4 other locations - About 15 mins to fix
gui/gui_main_menu.rb on lines 31..31
gui/gui_main_menu.rb on lines 32..32
gui/gui_main_menu.rb on lines 33..33
gui/gui_main_menu.rb on lines 34..34

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        self << (@description = GuiLabel.new.set({:width => 25, :lines => 3, :string => '', :color => [0.95,0.95,1.0], :offset_x => 0.19, :offset_y => 0.125, :scale_x => 0.58, :scale_y => 0.25}))
Severity: Minor
Found in gui/gui_add_window.rb and 1 other location - About 15 mins to fix
gui/gui_add_window.rb on lines 135..135

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        self << (@open_text   = GuiLabel.new.set({:color => [0.6,0.6,1.0], :string => 'open', :offset_x => 0.425, :offset_y => 0.48, :scale_x => 0.05, :scale_y => 0.04, :width => 4, :text_align => :fill}))
Severity: Minor
Found in gui/gui_main_menu.rb and 4 other locations - About 15 mins to fix
gui/gui_main_menu.rb on lines 29..29
gui/gui_main_menu.rb on lines 31..31
gui/gui_main_menu.rb on lines 33..33
gui/gui_main_menu.rb on lines 34..34

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        self << (@title_label = GuiLabel.new.set({:width => 20, :text_align => :center, :color => [0.6,0.6,1.0], :string => @title, :offset_x => 0.0, :offset_y => 0.47, :scale_x => 0.3, :scale_y => 0.05}))
Severity: Minor
Found in gui/gui_directory_dialog.rb and 5 other locations - About 15 mins to fix
gui/gui_confirmation_dialog.rb on lines 14..14
gui/gui_confirmation_dialog.rb on lines 15..15
gui/gui_confirmation_dialog.rb on lines 20..20
gui/gui_confirmation_dialog.rb on lines 22..22
gui/gui_file_dialog.rb on lines 80..80

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        self << (@quit_text   = GuiLabel.new.set({:color => [0.6,0.6,1.0], :string => 'quit', :offset_x => -0.42, :offset_y => -0.47, :scale_x => 0.05, :scale_y => 0.04, :width => 4, :text_align => :fill}))
Severity: Minor
Found in gui/gui_main_menu.rb and 4 other locations - About 15 mins to fix
gui/gui_main_menu.rb on lines 29..29
gui/gui_main_menu.rb on lines 31..31
gui/gui_main_menu.rb on lines 32..32
gui/gui_main_menu.rb on lines 34..34

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        self << (@title_label = GuiLabel.new.set({:width => 20, :text_align => :center, :color => [0.6,0.6,1.0], :string => @title, :offset_x => 0.0, :offset_y => 0.47, :scale_x => 0.3, :scale_y => 0.05}))
Severity: Minor
Found in gui/gui_file_dialog.rb and 5 other locations - About 15 mins to fix
gui/gui_confirmation_dialog.rb on lines 14..14
gui/gui_confirmation_dialog.rb on lines 15..15
gui/gui_confirmation_dialog.rb on lines 20..20
gui/gui_confirmation_dialog.rb on lines 22..22
gui/gui_directory_dialog.rb on lines 11..11

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        self << (@save_text   = GuiLabel.new.set({:color => [0.6,0.6,1.0], :string => 'save', :offset_x => 0.425, :offset_y => -0.47, :scale_x => 0.05, :scale_y => 0.04, :width => 4, :text_align => :fill}))
Severity: Minor
Found in gui/gui_main_menu.rb and 4 other locations - About 15 mins to fix
gui/gui_main_menu.rb on lines 29..29
gui/gui_main_menu.rb on lines 31..31
gui/gui_main_menu.rb on lines 32..32
gui/gui_main_menu.rb on lines 33..33

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    def from_rgba8(data, width, height)
        using {
            GL.TexImage2D(GL::TEXTURE_2D, mipmap=0, GL::RGBA, width, height, border=0, GL::RGBA, GL::UNSIGNED_BYTE, data)
            yield if block_given?
        }
Severity: Minor
Found in utils/image.rb and 2 other locations - About 15 mins to fix
utils/image.rb on lines 94..99
utils/image.rb on lines 102..107

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        self << (@title_label = GuiLabel.new.set({:width => 20, :text_align => :center, :color => [0.6,0.6,1.0], :string => @title, :offset_x => 0.0, :offset_y => 0.47, :scale_x => 0.30, :scale_y => 0.05}))
Severity: Minor
Found in gui/gui_confirmation_dialog.rb and 5 other locations - About 15 mins to fix
gui/gui_confirmation_dialog.rb on lines 15..15
gui/gui_confirmation_dialog.rb on lines 20..20
gui/gui_confirmation_dialog.rb on lines 22..22
gui/gui_directory_dialog.rb on lines 11..11
gui/gui_file_dialog.rb on lines 80..80

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

        self << (@description_label = GuiLabel.new.set({:width => 15, :text_align => :center, :color => [0.9,0.6,0.6], :string => @description, :offset_x => 0.0, :offset_y => 0.4, :scale_x => 0.25, :scale_y => 0.05}))
Severity: Minor
Found in gui/gui_confirmation_dialog.rb and 5 other locations - About 15 mins to fix
gui/gui_confirmation_dialog.rb on lines 14..14
gui/gui_confirmation_dialog.rb on lines 20..20
gui/gui_confirmation_dialog.rb on lines 22..22
gui/gui_directory_dialog.rb on lines 11..11
gui/gui_file_dialog.rb on lines 80..80

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 26.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language