hummingbird-me/hummingbird

View on GitHub
app/assets/javascripts/old/hogan-2.0.0.js

Summary

Maintainability
D
2 days
Test Coverage

File hogan-2.0.0.js has 436 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 *  Copyright 2011 Twitter, Inc.
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
Severity: Minor
Found in app/assets/javascripts/old/hogan-2.0.0.js - About 6 hrs to fix

    Function scan has 112 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      Hogan.scan = function scan(text, delimiters) {
        var len = text.length,
            IN_TEXT = 0,
            IN_TAG_TYPE = 1,
            IN_TAG = 2,
    Severity: Major
    Found in app/assets/javascripts/old/hogan-2.0.0.js - About 4 hrs to fix

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

        function buildTree(tokens, kind, stack, customTags) {
          var instructions = [],
              opener = null,
              token = null;
      
      
      Severity: Minor
      Found in app/assets/javascripts/old/hogan-2.0.0.js - About 1 hr to fix

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

            s: function(val, ctx, partials, inverted, start, end, tags) {
        Severity: Major
        Found in app/assets/javascripts/old/hogan-2.0.0.js - About 50 mins to fix

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

              ls: function(val, ctx, partials, inverted, start, end, tags) {
          Severity: Major
          Found in app/assets/javascripts/old/hogan-2.0.0.js - About 50 mins to fix

            Avoid deeply nested control flow statements.
            Open

                      if (tag) {
                        i++;
                      }
            Severity: Major
            Found in app/assets/javascripts/old/hogan-2.0.0.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                        if (tagType == '{') {
                          if (ctag == '}}') {
                            i++;
                          } else {
                            cleanTripleStache(tokens[tokens.length - 1]);
              Severity: Major
              Found in app/assets/javascripts/old/hogan-2.0.0.js - About 45 mins to fix

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

                  function section(nodes, id, method, start, end, tags) {
                Severity: Minor
                Found in app/assets/javascripts/old/hogan-2.0.0.js - About 45 mins to fix

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

                      ho: function(val, cx, partials, text, tags) {
                  Severity: Minor
                  Found in app/assets/javascripts/old/hogan-2.0.0.js - About 35 mins to fix

                    There are no issues that match your filters.

                    Category
                    Status