linagora/hublin

View on GitHub
frontend/js/thirdparty/modernizr.js

Summary

Maintainability
C
1 day
Test Coverage

File modernizr.js has 383 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * modernizr v3.5.0
 * Build https://modernizr.com/download?-datachannel-getusermedia-peerconnection-websockets-domprefixes-setclasses-dontmin
 *
 * Copyright (c)
Severity: Minor
Found in frontend/js/thirdparty/modernizr.js - About 5 hrs to fix

    Function testProps has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function testProps(props, prefixed, value, skipValueTest) {
        skipValueTest = is(skipValueTest, 'undefined') ? false : skipValueTest;
    
        // Try native detect first
        if (!is(value, 'undefined')) {
    Severity: Minor
    Found in frontend/js/thirdparty/modernizr.js - About 1 hr to fix

      Function injectElementWithStyles has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function injectElementWithStyles(rule, callback, nodes, testnames) {
          var mod = 'modernizr';
          var style;
          var ret;
          var node;
      Severity: Minor
      Found in frontend/js/thirdparty/modernizr.js - About 1 hr to fix

        Function testRunner has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function testRunner() {
            var featureNames;
            var feature;
            var aliasIdx;
            var result;
        Severity: Minor
        Found in frontend/js/thirdparty/modernizr.js - About 1 hr to fix

          Avoid deeply nested control flow statements.
          Open

                      for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) {
                        featureNames.push(feature.options.aliases[aliasIdx].toLowerCase());
                      }
          Severity: Major
          Found in frontend/js/thirdparty/modernizr.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                        if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {
                          Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);
                        }
            Severity: Major
            Found in frontend/js/thirdparty/modernizr.js - About 45 mins to fix

              Function testPropsAll has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                function testPropsAll(prop, prefixed, elem, value, skipValueTest) {
              Severity: Minor
              Found in frontend/js/thirdparty/modernizr.js - About 35 mins to fix

                Avoid too many return statements within this function.
                Open

                    return false;
                Severity: Major
                Found in frontend/js/thirdparty/modernizr.js - About 30 mins to fix

                  There are no issues that match your filters.

                  Category
                  Status