crowbar/crowbar-core

View on GitHub

Showing 6,062 of 6,062 total issues

Avoid too many return statements within this method.
Open

      return nil
Severity: Major
Found in crowbar_framework/app/controllers/ucs_controller.rb - About 30 mins to fix

Avoid too many return statements within this method.
Open

    return ucs_cookie
Severity: Major
Found in crowbar_framework/app/controllers/ucs_controller.rb - About 30 mins to fix

Avoid too many return statements within this method.
Open

        return "SLES 11 SP4" if target_platform == "suse-11.4"
Severity: Major
Found in crowbar_framework/lib/crowbar/platform.rb - About 30 mins to fix

Avoid too many return statements within this method.
Open

        return target_platform
Severity: Major
Found in crowbar_framework/lib/crowbar/platform.rb - About 30 mins to fix

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

  $.fn.dynamicTable = function(options) {
    return this.each(function() {
      new DynamicTable(this, options);
    });
  };
crowbar_framework/vendor/assets/javascripts/jquery/changeDetection.js on lines 70..74
crowbar_framework/vendor/assets/javascripts/jquery/hideShowClusterConf.js on lines 47..51
crowbar_framework/vendor/assets/javascripts/jquery/hideShowText.js on lines 120..124
crowbar_framework/vendor/assets/javascripts/jquery/ledUpdate.js on lines 256..260
crowbar_framework/vendor/assets/javascripts/jquery/listSearch.js on lines 62..66
crowbar_framework/vendor/assets/javascripts/jquery/updateAttribute.js on lines 60..64

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 45.

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

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

        var existing = $('#jqsshape' + shapeid),
          vel = this['_draw' + shape.type].apply(this, shape.args);
Severity: Minor
Found in crowbar_framework/vendor/assets/javascripts/jquery/sparkline.js and 1 other location - About 30 mins to fix
crowbar_framework/vendor/assets/javascripts/jquery/sparkline.js on lines 3030..3031

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 45.

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

Avoid too many return statements within this method.
Open

        return "SLES 11 SP3" if target_platform == "suse-11.3"
Severity: Major
Found in crowbar_framework/lib/crowbar/platform.rb - About 30 mins to fix

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

  $.fn.updateAttribute = function(options) {
    return this.each(function() {
      new UpdateAttribute(this, options);
    });
  };
crowbar_framework/vendor/assets/javascripts/jquery/changeDetection.js on lines 70..74
crowbar_framework/vendor/assets/javascripts/jquery/dynamicTable.js on lines 474..478
crowbar_framework/vendor/assets/javascripts/jquery/hideShowClusterConf.js on lines 47..51
crowbar_framework/vendor/assets/javascripts/jquery/hideShowText.js on lines 120..124
crowbar_framework/vendor/assets/javascripts/jquery/ledUpdate.js on lines 256..260
crowbar_framework/vendor/assets/javascripts/jquery/listSearch.js on lines 62..66

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 45.

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

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

        var existing = $('#jqsshape' + shapeid),
          vel = this['_draw' + shape.type].apply(this, shape.args);
Severity: Minor
Found in crowbar_framework/vendor/assets/javascripts/jquery/sparkline.js and 1 other location - About 30 mins to fix
crowbar_framework/vendor/assets/javascripts/jquery/sparkline.js on lines 3009..3010

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 45.

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

Avoid too many return statements within this method.
Open

        return "SLES 12" if target_platform == "suse-12.0"
Severity: Major
Found in crowbar_framework/lib/crowbar/platform.rb - About 30 mins to fix

Avoid too many return statements within this method.
Open

        return "Hyper-V Server 2012" if target_platform == "hyperv-6.2"
Severity: Major
Found in crowbar_framework/lib/crowbar/platform.rb - About 30 mins to fix

Avoid too many return statements within this method.
Open

        return "Hyper-V Server 2012 R2" if target_platform == "hyperv-6.3"
Severity: Major
Found in crowbar_framework/lib/crowbar/platform.rb - About 30 mins to fix

Avoid too many return statements within this method.
Open

        return "Windows Server 2012 R2" if target_platform == "windows-6.3"
Severity: Major
Found in crowbar_framework/lib/crowbar/platform.rb - About 30 mins to fix

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

  $.fn.hideShowClusterConf = function(options) {
    return this.each(function() {
      new HideShowClusterConf(this, options);
    });
  }
crowbar_framework/vendor/assets/javascripts/jquery/changeDetection.js on lines 70..74
crowbar_framework/vendor/assets/javascripts/jquery/dynamicTable.js on lines 474..478
crowbar_framework/vendor/assets/javascripts/jquery/hideShowText.js on lines 120..124
crowbar_framework/vendor/assets/javascripts/jquery/ledUpdate.js on lines 256..260
crowbar_framework/vendor/assets/javascripts/jquery/listSearch.js on lines 62..66
crowbar_framework/vendor/assets/javascripts/jquery/updateAttribute.js on lines 60..64

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 45.

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 7 locations. Consider refactoring.
Open

  $.fn.ledUpdate = function(options) {
    return this.each(function() {
      new LedUpdate(this, options);
    });
  };
crowbar_framework/vendor/assets/javascripts/jquery/changeDetection.js on lines 70..74
crowbar_framework/vendor/assets/javascripts/jquery/dynamicTable.js on lines 474..478
crowbar_framework/vendor/assets/javascripts/jquery/hideShowClusterConf.js on lines 47..51
crowbar_framework/vendor/assets/javascripts/jquery/hideShowText.js on lines 120..124
crowbar_framework/vendor/assets/javascripts/jquery/listSearch.js on lines 62..66
crowbar_framework/vendor/assets/javascripts/jquery/updateAttribute.js on lines 60..64

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 45.

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

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

    var self = obj instanceof this.constructor ?
      obj : $(obj.currentTarget).data('bs.' + this.type)
crowbar_framework/vendor/assets/javascripts/bootstrap/tooltip.js on lines 293..294

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 45.

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

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

        if ( event ) {
            $.each( event.split(" "), function( index, eventName ) {
                events[ eventName ] = "_eventHandler";
            });
        }
Severity: Minor
Found in crowbar_framework/vendor/assets/javascripts/jquery/ui.js and 1 other location - About 30 mins to fix
crowbar_framework/vendor/assets/javascripts/jquery/ui.js on lines 11964..11968

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 45.

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 7 locations. Consider refactoring.
Open

  $.fn.changedState = function(options) {
    return this.each(function() {
      new ChangedState(this, options);
    });
  };
crowbar_framework/vendor/assets/javascripts/jquery/dynamicTable.js on lines 474..478
crowbar_framework/vendor/assets/javascripts/jquery/hideShowClusterConf.js on lines 47..51
crowbar_framework/vendor/assets/javascripts/jquery/hideShowText.js on lines 120..124
crowbar_framework/vendor/assets/javascripts/jquery/ledUpdate.js on lines 256..260
crowbar_framework/vendor/assets/javascripts/jquery/listSearch.js on lines 62..66
crowbar_framework/vendor/assets/javascripts/jquery/updateAttribute.js on lines 60..64

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 45.

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

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

    var self = obj instanceof this.constructor ?
      obj : $(obj.currentTarget).data('bs.' + this.type)
crowbar_framework/vendor/assets/javascripts/bootstrap/tooltip.js on lines 256..257

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 45.

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

Avoid too many return statements within this method.
Open

        return "SLES 12 SP1" if target_platform == "suse-12.1"
Severity: Major
Found in crowbar_framework/lib/crowbar/platform.rb - About 30 mins to fix
Severity
Category
Status
Source
Language