renyard/validity

View on GitHub

Showing 29 of 75 total issues

Function validity has 151 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var validity = (function(validity) {
    "use strict";
    var options = {},
        $ = function(id) {
            return document.getElementById(id);
Severity: Major
Found in src/ui/js/options.js - About 6 hrs to fix

    Function exports has 138 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    module.exports = function (grunt) {
        "use strict";
    
        var merge = require("merge"),
            config = {},
    Severity: Major
    Found in Gruntfile.js - About 5 hrs to fix

      Function validity has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
      Open

      var validity = (function(validity) {
          "use strict";
          /**
           * @const
           * @name DEFAULT_VALIDATOR
      Severity: Minor
      Found in src/background/net.js - About 4 hrs 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

      Function validity has 97 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var validity = (function(validity) {
          "use strict";
          var xml = {},
              suppressed = [
                  // Deprecated in favour of nu validator.
      Severity: Major
      Found in src/background/xml.js - About 3 hrs to fix

        Function validity has 83 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var validity = (function(validity) {
            "use strict";
            var ui = {},
                animationRunning = false,
                icons = {
        Severity: Major
        Found in src/background/ui.js - About 3 hrs to fix

          Function validity has 79 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var validity = (function(validity) {
              "use strict";
              var controller = {},
                  net = validity.net,
                  ui = validity.ui,
          Severity: Major
          Found in src/background/controller.js - About 3 hrs to fix

            Function parseResponse has 78 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                xml.parseResponse = function(xmlDom) {
                    var response = {
                            "url": undefined,
                            "doctype": undefined,
                            "errorCount": undefined,
            Severity: Major
            Found in src/background/xml.js - About 3 hrs to fix

              Function validity has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
              Open

              var validity = (function(validity) {
                  "use strict";
                  var ui = {},
                      animationRunning = false,
                      icons = {
              Severity: Minor
              Found in src/background/ui.js - About 3 hrs 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

              Function validity has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
              Open

              var validity = (function(validity) {
                  "use strict";
                  var controller = {},
                      net = validity.net,
                      ui = validity.ui,
              Severity: Minor
              Found in src/background/controller.js - About 2 hrs 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

              Function validity has 67 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var validity = (function(validity) {
                  "use strict";
                  /**
                   * @const
                   * @name DEFAULT_VALIDATOR
              Severity: Major
              Found in src/background/net.js - About 2 hrs to fix

                Function validity has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                var validity = (function(validity) {
                    "use strict";
                    var util = {},
                        readyQueue = [];
                
                
                Severity: Major
                Found in src/background/util.js - About 2 hrs to fix

                  Function validity has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var validity = (function (validity) {
                      "use strict";
                      var opts = {},
                          options = {},
                          backend,
                  Severity: Major
                  Found in src/background/opts.js - About 2 hrs to fix

                    Function init has 54 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        options.init = function() {
                            var validator = $('validator'),
                                legacy = $('legacy');
                    
                            enableHostsElm = $('enableHosts');
                    Severity: Major
                    Found in src/ui/js/options.js - About 2 hrs to fix

                      Function validity has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
                      Open

                      var validity = (function(validity) {
                          "use strict";
                          var util = {},
                              readyQueue = [];
                      
                      
                      Severity: Minor
                      Found in src/background/util.js - About 2 hrs 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

                      Function exports has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      module.exports = function(config) {
                        var conf = {
                      
                          // base path that will be used to resolve all patterns (eg. files, exclude)
                          basePath: '',
                      Severity: Major
                      Found in karma.conf.js - About 2 hrs to fix

                        Function validity has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        var validity = (function(validity) {
                            "use strict";
                            var stats = {},
                                ga_elm,
                                purge_timeout,
                        Severity: Minor
                        Found in src/background/stats.js - About 1 hr to fix

                          Function _logMessages has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function _logMessages(response) {
                                  var messages,
                                      message,
                                      line,
                                      errorCount = response.errorCount,
                          Severity: Minor
                          Found in src/validity.js - About 1 hr to fix

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

                                net.submitValidation = function(tab, source, callback) {
                                    var validator,
                                        legacy,
                                        xhrValidator = new XMLHttpRequest();
                            
                            
                            Severity: Minor
                            Found in src/background/net.js - About 1 hr to fix

                              Function validity has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                              Open

                              var validity = (function(validity) {
                                  "use strict";
                                  var options = {},
                                      $ = function(id) {
                                          return document.getElementById(id);
                              Severity: Minor
                              Found in src/ui/js/options.js - About 1 hr 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

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

                                  controller.dispatch = function(request, sender) {
                                      var tabHost,
                                          enabledForHost,
                                          autoValidateForHost,
                                          response = {},
                              Severity: Minor
                              Found in src/background/controller.js - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language