macool/jquery-ecuador-id-validator

View on GitHub

Showing 55 of 123 total issues

File jasmine.js has 1624 lines of code (exceeds 250 allowed). Consider refactoring.
Open

var isCommonJS = typeof window == "undefined" && typeof exports == "object";

/**
 * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework.
 *
Severity: Major
Found in lib/jasmine-1.3.1/jasmine.js - About 4 days to fix

    File jasmine-html.js has 540 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    jasmine.HtmlReporterHelpers = {};
    
    jasmine.HtmlReporterHelpers.createDom = function(type, attrs, childrenVarArgs) {
      var el = document.createElement(type);
    
    
    Severity: Major
    Found in lib/jasmine-1.3.1/jasmine-html.js - About 1 day to fix

      File jasmine-jquery.js has 446 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*!
       Jasmine-jQuery: a set of jQuery helpers for Jasmine tests.
       
       Version 1.5.0
       
      Severity: Minor
      Found in lib/jasmine-jquery-1.5.0/jasmine-jquery.js - About 6 hrs to fix

        Function matcherFn_ has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
        Open

        jasmine.Matchers.matcherFn_ = function(matcherName, matcherFunction) {
          return function() {
            var matcherArgs = jasmine.util.argsToArray(arguments);
            var result = matcherFunction.apply(this, arguments);
        
        
        Severity: Minor
        Found in lib/jasmine-1.3.1/jasmine.js - About 6 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 ReporterView has 119 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        jasmine.HtmlReporter.ReporterView = function(dom) {
          this.startedAt = new Date();
          this.runningSpecCount = 0;
          this.completeSpecCount = 0;
          this.passedCount = 0;
        Severity: Major
        Found in lib/jasmine-1.3.1/jasmine-html.js - About 4 hrs to fix

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

          jasmine.HtmlReporter.ReporterView = function(dom) {
            this.startedAt = new Date();
            this.runningSpecCount = 0;
            this.completeSpecCount = 0;
            this.passedCount = 0;
          Severity: Minor
          Found in lib/jasmine-1.3.1/jasmine-html.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 HtmlReporter has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
          Open

          jasmine.HtmlReporter = function(_doc) {
            var self = this;
            var doc = _doc || window.document;
          
            var reporterView;
          Severity: Minor
          Found in lib/jasmine-1.3.1/jasmine-html.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 HtmlReporter has 107 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          jasmine.HtmlReporter = function(_doc) {
            var self = this;
            var doc = _doc || window.document;
          
            var reporterView;
          Severity: Major
          Found in lib/jasmine-1.3.1/jasmine-html.js - About 4 hrs to fix

            Function next_ has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
            Open

            jasmine.Queue.prototype.next_ = function() {
              var self = this;
              var goAgain = true;
            
              while (goAgain) {
            Severity: Minor
            Found in lib/jasmine-1.3.1/jasmine.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 validate has 85 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  RucValidatorEc.prototype.validate = function() {
                    var digito_verificador, i, modulo, multiplicadores, p, producto, productos, provincias, residuo, suma, tercer_digito, verificador, _i, _j, _k, _l, _len, _len1, _ref, _ref1;
                    if ((_ref = this.numero.length) !== 10 && _ref !== 13) {
                      this.valid = false;
                      throw new Error("Longitud incorrecta.");
            Severity: Major
            Found in src/ruc_jquery_validator.js - About 3 hrs to fix

              Function compareObjects_ has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
              Open

              jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) {
                if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) {
                  return true;
                }
              
              
              Severity: Minor
              Found in lib/jasmine-1.3.1/jasmine.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 format has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
              Open

              jasmine.PrettyPrinter.prototype.format = function(value) {
                this.ppNestLevel_++;
                try {
                  if (value === jasmine.undefined) {
                    this.emitScalar('undefined');
              Severity: Minor
              Found in lib/jasmine-1.3.1/jasmine.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 63 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              module.exports = function(grunt) {
                // Project configuration.
                grunt.initConfig({
                  pkg: grunt.file.readJSON('package.json'),
                  coffee: {
              Severity: Major
              Found in Gruntfile.js - About 2 hrs to fix

                Function equals_ has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                Open

                jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) {
                  mismatchKeys = mismatchKeys || [];
                  mismatchValues = mismatchValues || [];
                
                  for (var i = 0; i < this.equalityTesters_.length; i++) {
                Severity: Minor
                Found in lib/jasmine-1.3.1/jasmine.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 reportRunnerStarting has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                jasmine.TrivialReporter.prototype.reportRunnerStarting = function(runner) {
                  var showPassed, showSkipped;
                
                  this.outerDiv = this.createDom('div', { id: 'TrivialReporter', className: 'jasmine_reporter' },
                      this.createDom('div', { className: 'banner' },
                Severity: Minor
                Found in lib/jasmine-1.3.1/jasmine-html.js - About 1 hr to fix

                  Function next_ has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  jasmine.Queue.prototype.next_ = function() {
                    var self = this;
                    var goAgain = true;
                  
                    while (goAgain) {
                  Severity: Minor
                  Found in lib/jasmine-1.3.1/jasmine.js - About 1 hr to fix

                    Function equals_ has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) {
                      mismatchKeys = mismatchKeys || [];
                      mismatchValues = mismatchValues || [];
                    
                      for (var i = 0; i < this.equalityTesters_.length; i++) {
                    Severity: Minor
                    Found in lib/jasmine-1.3.1/jasmine.js - About 1 hr to fix

                      Function runFunctionsWithinRange has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                      Open

                      jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMillis) {
                        var scheduledFunc;
                        var funcsToRun = [];
                        for (var timeoutKey in this.scheduledFunctions) {
                          scheduledFunc = this.scheduledFunctions[timeoutKey];
                      Severity: Minor
                      Found in lib/jasmine-1.3.1/jasmine.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 compareRegExps_ has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                      Open

                      jasmine.Env.prototype.compareRegExps_ = function(a, b, mismatchKeys, mismatchValues) {
                        if (a.source != b.source)
                          mismatchValues.push("expected pattern /" + b.source + "/ is not equal to the pattern /" + a.source + "/");
                      
                        if (a.ignoreCase != b.ignoreCase)
                      Severity: Minor
                      Found in lib/jasmine-1.3.1/jasmine.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 format has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      jasmine.PrettyPrinter.prototype.format = function(value) {
                        this.ppNestLevel_++;
                        try {
                          if (value === jasmine.undefined) {
                            this.emitScalar('undefined');
                      Severity: Minor
                      Found in lib/jasmine-1.3.1/jasmine.js - About 1 hr to fix
                        Severity
                        Category
                        Status
                        Source
                        Language