crowbar/crowbar-core

View on GitHub

Showing 6,062 of 6,062 total issues

Consider simplifying this complex logical expression.
Open

    if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {
        return;
    }
Severity: Major
Found in crowbar_framework/vendor/assets/javascripts/jquery/jquery.js - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

            if ( matcher[ expando ] ) {
                // Find the next relative operator (if any) for proper handling
                j = ++i;
                for ( ; j < len; j++ ) {
                    if ( Expr.relative[ tokens[j].type ] ) {
Severity: Major
Found in crowbar_framework/vendor/assets/javascripts/jquery/jquery.js - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

    if ( support.matchesSelector && documentIsHTML &&
        ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
        ( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {

        try {
Severity: Major
Found in crowbar_framework/vendor/assets/javascripts/jquery/jquery.js - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

if ( !support.opacity ) {
    jQuery.cssHooks.opacity = {
        get: function( elem, computed ) {
            // IE uses filters for opacity
            return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
Severity: Major
Found in crowbar_framework/vendor/assets/javascripts/jquery/jquery.js - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

            if ( ( this.options.values.length === 2 && this.options.range === true ) &&
                    ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )
                ) {
                newVal = otherVal;
            }
Severity: Major
Found in crowbar_framework/vendor/assets/javascripts/jquery/ui.js - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

        if ( tab.hasClass( "ui-state-disabled" ) ||
                // tab is already loading
                tab.hasClass( "ui-tabs-loading" ) ||
                // can't switch durning an animation
                this.running ||
Severity: Major
Found in crowbar_framework/vendor/assets/javascripts/jquery/ui.js - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

            if(
                inst.options.greedy &&
                !inst.options.disabled &&
                inst.options.scope === draggable.options.scope &&
                inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) &&
Severity: Major
Found in crowbar_framework/vendor/assets/javascripts/jquery/ui.js - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

    if ( o.mode === "toggle" && mode === "show" ) {
        el.from = o.to || zero;
        el.to = o.from || original;
    } else {
        el.from = o.from || ( mode === "show" ? zero : original );
Severity: Major
Found in crowbar_framework/vendor/assets/javascripts/jquery/ui.js - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

                    if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
                        curElem = hook === "backgroundColor" ? elem.parentNode : elem;
                        while (
                            (backgroundColor === "" || backgroundColor === "transparent") &&
                            curElem && curElem.style
Severity: Major
Found in crowbar_framework/vendor/assets/javascripts/jquery/ui.js - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

          if (hlSpotsEnabled || options.get('spotColor') ||
            (options.get('minSpotColor') || options.get('maxSpotColor') &&
              (yvalues[yvallast] === this.miny || yvalues[yvallast] === this.maxy))) {
            canvasWidth -= Math.ceil(spotRadius);
          }
Severity: Major
Found in crowbar_framework/vendor/assets/javascripts/jquery/sparkline.js - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

      unless bootdisks.empty?
        # SLE11 SP3 generates so-called "MSFT compatibility links"
        # that start with scsi-1. Skip those, as those are less
        # reusable than the normal links.
        # Note: this find construct should match the code in
Severity: Major
Found in chef/cookbooks/provisioner/recipes/bootdisk.rb - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

            unless candidates.empty?
              match = candidates.find { |b| b =~ /^wwn-/ } ||
                candidates.find { |b| b =~ /^scsi-[a-zA-Z]/ } ||
                candidates.find { |b| b =~ /^scsi-[^1]/ } ||
                candidates.find { |b| b =~ /^scsi-/ } ||
Severity: Major
Found in chef/cookbooks/barclamp/libraries/barclamp_library.rb - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

            if (out.initialPreview !== undefined && out.initialPreview.length > 0) {
                self.hasInitData = true;
                content = out.initialPreview || [];
                config = out.initialPreviewConfig || [];
                tags = out.initialPreviewThumbTags || [];
Severity: Major
Found in crowbar_framework/vendor/assets/javascripts/bootstrap/fileinput.js - About 40 mins to fix

Consider simplifying this complex logical expression.
Open

    if meta
      # For some disk (e.g. virtio without serial number on SLE12)
      # meta["disks"] is empty. In that case we can't get a "more unique"
      # name than "vdX"
      return "/dev/#{device}" unless meta["disks"]
Severity: Major
Found in crowbar_framework/app/models/node.rb - About 40 mins to fix

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

            if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
                $( active ).focus();
            }
Severity: Minor
Found in crowbar_framework/vendor/assets/javascripts/jquery/ui.js and 1 other location - About 40 mins to fix
crowbar_framework/vendor/assets/javascripts/jquery/ui.js on lines 13702..13704

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

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

  $.fn.dropdown.noConflict = function () {
    $.fn.dropdown = old
    return this
  }
crowbar_framework/vendor/assets/javascripts/bootstrap/affix.js on lines 141..144
crowbar_framework/vendor/assets/javascripts/bootstrap/alert.js on lines 84..87
crowbar_framework/vendor/assets/javascripts/bootstrap/button.js on lines 100..103
crowbar_framework/vendor/assets/javascripts/bootstrap/carousel.js on lines 201..204
crowbar_framework/vendor/assets/javascripts/bootstrap/collapse.js on lines 191..194
crowbar_framework/vendor/assets/javascripts/bootstrap/modal.js on lines 329..332
crowbar_framework/vendor/assets/javascripts/bootstrap/scrollspy.js on lines 156..159
crowbar_framework/vendor/assets/javascripts/bootstrap/tab.js on lines 137..140

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

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

  $.fn.carousel.noConflict = function () {
    $.fn.carousel = old
    return this
  }
crowbar_framework/vendor/assets/javascripts/bootstrap/affix.js on lines 141..144
crowbar_framework/vendor/assets/javascripts/bootstrap/alert.js on lines 84..87
crowbar_framework/vendor/assets/javascripts/bootstrap/button.js on lines 100..103
crowbar_framework/vendor/assets/javascripts/bootstrap/collapse.js on lines 191..194
crowbar_framework/vendor/assets/javascripts/bootstrap/dropdown.js on lines 149..152
crowbar_framework/vendor/assets/javascripts/bootstrap/modal.js on lines 329..332
crowbar_framework/vendor/assets/javascripts/bootstrap/scrollspy.js on lines 156..159
crowbar_framework/vendor/assets/javascripts/bootstrap/tab.js on lines 137..140

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

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

  $.fn.collapse.noConflict = function () {
    $.fn.collapse = old
    return this
  }
crowbar_framework/vendor/assets/javascripts/bootstrap/affix.js on lines 141..144
crowbar_framework/vendor/assets/javascripts/bootstrap/alert.js on lines 84..87
crowbar_framework/vendor/assets/javascripts/bootstrap/button.js on lines 100..103
crowbar_framework/vendor/assets/javascripts/bootstrap/carousel.js on lines 201..204
crowbar_framework/vendor/assets/javascripts/bootstrap/dropdown.js on lines 149..152
crowbar_framework/vendor/assets/javascripts/bootstrap/modal.js on lines 329..332
crowbar_framework/vendor/assets/javascripts/bootstrap/scrollspy.js on lines 156..159
crowbar_framework/vendor/assets/javascripts/bootstrap/tab.js on lines 137..140

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

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

  $.fn.button.noConflict = function () {
    $.fn.button = old
    return this
  }
crowbar_framework/vendor/assets/javascripts/bootstrap/affix.js on lines 141..144
crowbar_framework/vendor/assets/javascripts/bootstrap/alert.js on lines 84..87
crowbar_framework/vendor/assets/javascripts/bootstrap/carousel.js on lines 201..204
crowbar_framework/vendor/assets/javascripts/bootstrap/collapse.js on lines 191..194
crowbar_framework/vendor/assets/javascripts/bootstrap/dropdown.js on lines 149..152
crowbar_framework/vendor/assets/javascripts/bootstrap/modal.js on lines 329..332
crowbar_framework/vendor/assets/javascripts/bootstrap/scrollspy.js on lines 156..159
crowbar_framework/vendor/assets/javascripts/bootstrap/tab.js on lines 137..140

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

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

  $.fn.tab.noConflict = function () {
    $.fn.tab = old
    return this
  }
Severity: Major
Found in crowbar_framework/vendor/assets/javascripts/bootstrap/tab.js and 8 other locations - About 40 mins to fix
crowbar_framework/vendor/assets/javascripts/bootstrap/affix.js on lines 141..144
crowbar_framework/vendor/assets/javascripts/bootstrap/alert.js on lines 84..87
crowbar_framework/vendor/assets/javascripts/bootstrap/button.js on lines 100..103
crowbar_framework/vendor/assets/javascripts/bootstrap/carousel.js on lines 201..204
crowbar_framework/vendor/assets/javascripts/bootstrap/collapse.js on lines 191..194
crowbar_framework/vendor/assets/javascripts/bootstrap/dropdown.js on lines 149..152
crowbar_framework/vendor/assets/javascripts/bootstrap/modal.js on lines 329..332
crowbar_framework/vendor/assets/javascripts/bootstrap/scrollspy.js on lines 156..159

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

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