matthucke/graveyards4

View on GitHub

Showing 63 of 84 total issues

Function next has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  next:function () {
          if (this.done) {
              return this.EOF;
          }
          if (!this._input) this.done = true;
Severity: Minor
Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 2 hrs to fix

    Function setupOptions has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        setupOptions: function(paramSize, params) {
          var options = [], contexts = [], types = [], param, inverse, program;
    
          options.push("hash:" + this.popStack());
    
    
    Severity: Minor
    Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 1 hr to fix

      Function createFunctionContext has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          createFunctionContext: function(asObject) {
            var locals = this.stackVars.concat(this.registers.list);
      
            if(locals.length > 0) {
              this.source[1] = this.source[1] + ", " + locals.join(", ");
      Severity: Minor
      Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 1 hr to fix

        Function compile has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            compile: function(environment, options, context, asObject) {
              this.environment = environment;
              this.options = options || {};
        
              log('debug', this.environment.disassemble() + "\n\n");
        Severity: Minor
        Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 1 hr to fix

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

              replaceStack: function(callback) {
                var prefix = '',
                    inline = this.isInline(),
                    stack,
                    createdStack,
          Severity: Minor
          Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 1 hr to fix

            Function __module0__ has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var __module0__ = (function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__) {
              "use strict";
              var __exports__;
              /*globals Handlebars: true */
              var Handlebars = __dependency1__;
            Severity: Minor
            Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 1 hr to fix

              Function ProgramNode has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  ProgramNode: function(statements, inverseStrip, inverse, locInfo) {
                    var inverseLocationInfo, firstInverseNode;
                    if (arguments.length === 3) {
                      locInfo = inverse;
                      inverse = null;
              Severity: Minor
              Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 1 hr to fix

                Method show has 28 lines of code (exceeds 25 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 1 hr to fix

                  Function block has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      block: function(block) {
                        var mustache = block.mustache,
                            program = block.program,
                            inverse = block.inverse;
                  
                  
                  Severity: Minor
                  Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 1 hr to fix

                    Function MarkerWithLabel has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function MarkerWithLabel(opt_options) {
                          opt_options = opt_options || {};
                          opt_options.labelContent = opt_options.labelContent || "";
                          opt_options.labelAnchor = opt_options.labelAnchor || new google.maps.Point(0, 0);
                          opt_options.labelClass = opt_options.labelClass || "markerLabels";
                    Severity: Minor
                    Found in app/assets/javascripts/maps/markerwithlabel.js - About 1 hr to fix

                      Function IdNode has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          IdNode: function(parts, locInfo) {
                            LocationInfo.call(this, locInfo);
                            this.type = "ID";
                      
                            var original = "",
                      Severity: Minor
                      Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 1 hr to fix

                        Function equals has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            equals: function(other) {
                              var len = this.opcodes.length;
                              if (other.opcodes.length !== len) {
                                return false;
                              }
                        Severity: Minor
                        Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 1 hr to fix

                          Method default_full_path has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                          Open

                            def default_full_path
                              p = respond_to?(:parent) ? parent : nil
                              if p && p != self
                                p.set_default_full_path if p.full_path.blank?
                                unless p.full_path.blank?
                          Severity: Minor
                          Found in app/models/concerns/builds_path.rb - About 55 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

                          Method require_owner_of! has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                          Open

                            def require_owner_of!(object, user: nil, message: nil)
                              user ||= current_user
                              if object.respond_to?(:user_id)
                                return true if object.user_id == user.id
                              end
                          Severity: Minor
                          Found in app/controllers/concerns/knows_current_user.rb - About 55 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

                          Function performAction has 7 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                            performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
                          Severity: Major
                          Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 50 mins to fix

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

                              __exports__.program = program;function invokePartial(partial, name, context, helpers, partials, data) {
                            Severity: Minor
                            Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                            if(data) { 
                                              data.key = key; 
                                              data.index = i;
                                              data.first = (i === 0);
                                            }
                              Severity: Major
                              Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                            url += ".#{fmt}" unless fmt.blank?
                                Severity: Major
                                Found in app/controllers/legacy_controller.rb - About 45 mins to fix

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

                                      var invokePartialWrapper = function(partial, name, context, helpers, partials, data) {
                                  Severity: Minor
                                  Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                          if (this.terminals_[p] && p > 2) {
                                                              expected.push("'" + this.terminals_[p] + "'");
                                                          }
                                    Severity: Major
                                    Found in app/assets/javascripts/libs/handlebars-v1.3.0.js - About 45 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language