matthucke/graveyards4

View on GitHub

Showing 63 of 84 total issues

Function Handlebars has a Cognitive Complexity of 941 (exceeds 5 allowed). Consider refactoring.
Open

var Handlebars = (function() {
// handlebars/safe-string.js
var __module4__ = (function() {
  "use strict";
  var __exports__;
Severity: Minor
Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 2 wks 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 Handlebars has 2057 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var Handlebars = (function() {
// handlebars/safe-string.js
var __module4__ = (function() {
  "use strict";
  var __exports__;
Severity: Major
Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 1 wk to fix

    File handlebars-v1.3.0.js has 2059 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
    
     handlebars v1.3.0
    
    Copyright (C) 2011 by Yehuda Katz
    Severity: Major
    Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 5 days to fix

      Function __module11__ has 609 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var __module11__ = (function(__dependency1__, __dependency2__) {
        "use strict";
        var __exports__;
        var COMPILER_REVISION = __dependency1__.COMPILER_REVISION;
        var REVISION_CHANGES = __dependency1__.REVISION_CHANGES;
      Severity: Major
      Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 3 days to fix

        Function __module9__ has 468 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var __module9__ = (function() {
          "use strict";
          var __exports__;
          /* jshint ignore:start */
          /* Jison generated parser */
        Severity: Major
        Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 2 days to fix

          Function handlebars has 464 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            var handlebars = (function(){
            var parser = {trace: function trace() { },
            yy: {},
            symbols_: {"error":2,"root":3,"statements":4,"EOF":5,"program":6,"simpleInverse":7,"statement":8,"openInverse":9,"closeBlock":10,"openBlock":11,"mustache":12,"partial":13,"CONTENT":14,"COMMENT":15,"OPEN_BLOCK":16,"sexpr":17,"CLOSE":18,"OPEN_INVERSE":19,"OPEN_ENDBLOCK":20,"path":21,"OPEN":22,"OPEN_UNESCAPED":23,"CLOSE_UNESCAPED":24,"OPEN_PARTIAL":25,"partialName":26,"partial_option0":27,"sexpr_repetition0":28,"sexpr_option0":29,"dataName":30,"param":31,"STRING":32,"INTEGER":33,"BOOLEAN":34,"OPEN_SEXPR":35,"CLOSE_SEXPR":36,"hash":37,"hash_repetition_plus0":38,"hashSegment":39,"ID":40,"EQUALS":41,"DATA":42,"pathSegments":43,"SEP":44,"$accept":0,"$end":1},
            terminals_: {2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",32:"STRING",33:"INTEGER",34:"BOOLEAN",35:"OPEN_SEXPR",36:"CLOSE_SEXPR",40:"ID",41:"EQUALS",42:"DATA",44:"SEP"},
          Severity: Major
          Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 2 days to fix

            Function __module10__ has 358 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var __module10__ = (function(__dependency1__) {
              "use strict";
              var __exports__ = {};
              var Exception = __dependency1__;
            
            
            Severity: Major
            Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 1 day to fix

              Function lexer has 247 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                var lexer = (function(){
                var lexer = ({EOF:1,
                parseError:function parseError(str, hash) {
                        if (this.yy.parser) {
                            this.yy.parser.parseError(str, hash);
              Severity: Major
              Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 1 day to fix

                Function onAdd has 183 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    MarkerLabel_.prototype.onAdd = function () {
                      var me = this;
                      var cMouseIsDown = false;
                      var cDraggingLabel = false;
                      var cSavedZIndex;
                Severity: Major
                Found in app/assets/javascripts/maps/markerwithlabel.js - About 7 hrs to fix

                  Function __module7__ has 174 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var __module7__ = (function(__dependency1__) {
                    "use strict";
                    var __exports__;
                    var Exception = __dependency1__;
                  
                  
                  Severity: Major
                  Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 6 hrs to fix

                    Function __module2__ has 149 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var __module2__ = (function(__dependency1__, __dependency2__) {
                      "use strict";
                      var __exports__ = {};
                      var Utils = __dependency1__;
                      var Exception = __dependency2__;
                    Severity: Major
                    Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 5 hrs to fix

                      Method show has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                      Open

                        def show
                          # First look for id=NNN; if we find it it's a simple graveyard path.
                          if id=params[:id]
                            if id.to_i > 0
                              if @graveyard = Graveyard.find(id) rescue nil
                      Severity: Minor
                      Found in app/controllers/legacy_controller.rb - 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 __module6__ has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      var __module6__ = (function(__dependency1__, __dependency2__, __dependency3__) {
                        "use strict";
                        var __exports__ = {};
                        var Utils = __dependency1__;
                        var Exception = __dependency2__;
                      Severity: Major
                      Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 4 hrs to fix

                        File markerwithlabel.js has 349 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /**
                         * @name MarkerWithLabel for V3
                         * @version 1.1.9 [June 30, 2013]
                         * @author Gary Little (inspired by code from Marc Ridey of Google).
                         * @copyright Copyright 2012 Gary Little [gary at luxcentral.com]
                        Severity: Minor
                        Found in app/assets/javascripts/maps/markerwithlabel.js - About 4 hrs to fix

                          Function parse has 101 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            parse: function parse(input) {
                                var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
                                this.lexer.setInput(input);
                                this.lexer.yy = this.yy;
                                this.yy.lexer = this.lexer;
                          Severity: Major
                          Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 4 hrs to fix

                            Function anonymous has 91 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
                            
                              var $0 = $$.length - 1;
                              switch (yystate) {
                              case 1: return new yy.ProgramNode($$[$0-1], this._$); 
                            Severity: Major
                            Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 3 hrs to fix

                              Function anonymous has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
                              
                              
                                function strip(start, end) {
                                  return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng-end);
                              Severity: Major
                              Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 3 hrs to fix

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

                                  function registerDefaultHelpers(instance) {
                                    instance.registerHelper('helperMissing', function(arg) {
                                      if(arguments.length === 2) {
                                        return undefined;
                                      } else {
                                Severity: Major
                                Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 3 hrs to fix

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

                                    function template(templateSpec, env) {
                                      if (!env) {
                                        throw new Exception("No environment passed to template");
                                      }
                                  
                                  
                                  Severity: Major
                                  Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 2 hrs to fix

                                    Function __module3__ has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    var __module3__ = (function(__dependency1__) {
                                      "use strict";
                                      var __exports__ = {};
                                      /*jshint -W004 */
                                      var SafeString = __dependency1__;
                                    Severity: Major
                                    Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 2 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language