siad007/versioncontrol_hg

View on GitHub

Showing 256 of 256 total issues

Avoid deeply nested control flow statements.
Open

                    if ( copyIsArray ) {
                        copyIsArray = false;
                        clone = src && jQuery.isArray(src) ? src : [];

                    } else {
Severity: Major
Found in docs/api/phpdoc/js/jquery-1.7.1.min.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                    if ( flags.unique ) {
                                        break;
                                    }
    Severity: Major
    Found in docs/api/phpdoc/js/jquery-1.7.1.min.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              for ( j = tbody.length - 1; j >= 0 ; --j ) {
                                  if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
                                      tbody[ j ].parentNode.removeChild( tbody[ j ] );
                                  }
                              }
      Severity: Major
      Found in docs/api/phpdoc/js/jquery-1.7.1.min.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if ( special[ type ] ) {
                                    jQuery.event.remove( elem, type );
        
                                // This is a shortcut to avoid jQuery.event.remove's overhead
                                } else {
        Severity: Major
        Found in docs/api/phpdoc/js/jquery-1.7.1.min.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if ( !inplace ) {
                                  curLoop = result;
                              }
          Severity: Major
          Found in docs/api/phpdoc/js/jquery-1.7.1.min.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                if ( typeof cur !== "string" ) {
                                    if ( elem === cur ) {
                                        match = true;
                                        break;
                                    }
            Severity: Major
            Found in docs/api/phpdoc/js/jquery-1.7.1.min.js - About 45 mins to fix

              Function onload has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
              Open

              window.onload = function() {
                  function addIcon(el, entity) {
                      var html = el.innerHTML;
                      el.innerHTML = '<span style="font-family: \'phpdocumentor-clean-icons\'">' + entity + '</span>' + html;
                  }
              Severity: Minor
              Found in docs/api/phpdoc/css/phpdocumentor-clean-icons/lte-ie7.js - About 45 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

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

                       if (settings.out_x2) { settings.out_x2.val(Math.round(data.position.x2 / settings.factor)) }
              Severity: Major
              Found in docs/api/phpdoc/js/jquery.panzoom.js and 3 other locations - About 45 mins to fix
              docs/api/phpdoc/js/jquery.panzoom.js on lines 434..434
              docs/api/phpdoc/js/jquery.panzoom.js on lines 435..435
              docs/api/phpdoc/js/jquery.panzoom.js on lines 437..437

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

              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 deeply nested control flow statements.
              Open

                                              if ( firing ) {
                                                  if ( i <= firingLength ) {
                                                      firingLength--;
                                                      if ( i <= firingIndex ) {
                                                          firingIndex--;
              Severity: Major
              Found in docs/api/phpdoc/js/jquery-1.7.1.min.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    if ( !anyFound ) {
                                        return [];
                                    }
                Severity: Major
                Found in docs/api/phpdoc/js/jquery-1.7.1.min.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                                      if ( xml && xml.documentElement /* #4958 */ ) {
                                                          responses.xml = xml;
                                                      }
                  Severity: Major
                  Found in docs/api/phpdoc/js/jquery-1.7.1.min.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                        if ( !status && s.isLocal && !s.crossDomain ) {
                                                            status = responses.text ? 200 : 404;
                                                        // IE - #1450: sometimes returns 1223 when it should be 204
                                                        } else if ( status === 1223 ) {
                                                            status = 204;
                    Severity: Major
                    Found in docs/api/phpdoc/js/jquery-1.7.1.min.js - About 45 mins to fix

                      Function setImageProps has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          this.setImageProps = function(disp_w, disp_h, x, y, skip_animation, complete) {
                      Severity: Minor
                      Found in docs/api/phpdoc/js/jquery.iviewer.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if ( ret === false ) {
                                                    event.preventDefault();
                                                    event.stopPropagation();
                                                }
                        Severity: Major
                        Found in docs/api/phpdoc/js/jquery-1.7.1.min.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              if ( !old ) {
                                                  context.setAttribute( "id", nid );
                                              } else {
                                                  nid = nid.replace( /'/g, "\\$&" );
                                              }
                          Severity: Major
                          Found in docs/api/phpdoc/js/jquery-1.7.1.min.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                if ( relativeHierarchySelector && hasParent ) {
                                                    context = context.parentNode;
                                                }
                            Severity: Major
                            Found in docs/api/phpdoc/js/jquery-1.7.1.min.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                                  if ( xhr.readyState !== 4 ) {
                                                                      xhr.abort();
                                                                  }
                              Severity: Major
                              Found in docs/api/phpdoc/js/jquery-1.7.1.min.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                        if(obj[cnn]){
                                         /*DBG*/ //if(window.console) console.log(['x2j',nn,'node>f',cnn,'ARRAY']);
                                         
                                                                    // http://forum.jquery.com/topic/jquery-jquery-xml2json-problems-when-siblings-of-the-same-tagname-only-have-a-textnode-as-a-child
                                                                    if(!obj[cnn].length) obj[cnn] = myArr(obj[cnn]);
                                Severity: Major
                                Found in docs/api/phpdoc/js/jquery.xml2json.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                                      if ( xhrOnUnloadAbort ) {
                                                                          delete xhrCallbacks[ handle ];
                                                                      }
                                  Severity: Major
                                  Found in docs/api/phpdoc/js/jquery-1.7.1.min.js - About 45 mins to fix

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

                                             if (settings.out_y1) { settings.out_y1.val(Math.round(data.position.y1 / settings.factor)) }
                                    Severity: Major
                                    Found in docs/api/phpdoc/js/jquery.panzoom.js and 3 other locations - About 45 mins to fix
                                    docs/api/phpdoc/js/jquery.panzoom.js on lines 434..434
                                    docs/api/phpdoc/js/jquery.panzoom.js on lines 436..436
                                    docs/api/phpdoc/js/jquery.panzoom.js on lines 437..437

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

                                    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