tbranyen/combyne

View on GitHub
lib/tree.js

Summary

Maintainability
D
2 days
Test Coverage

File tree.js has 408 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * A tree representation of the template tokens.
 *
 * @module tree
 */
Severity: Minor
Found in lib/tree.js - About 5 hrs to fix

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

      Tree.prototype.constructConditional = function(root, kind) {
        root.type = root.type || "ConditionalExpression";
        root.conditions = root.conditions || [];
    
        var prev = {};
    Severity: Major
    Found in lib/tree.js - About 2 hrs to fix

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

        Tree.prototype.constructEach = function(root) {
          root.type = "LoopExpression";
          root.conditions = [];
      
          // Find the left side identifier.
      Severity: Major
      Found in lib/tree.js - About 2 hrs to fix

        Function make has 56 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          Tree.prototype.make = function(root, END) {
            root = root || this.root;
        
            var node, result, prev, next;
            var index = 0;
        Severity: Major
        Found in lib/tree.js - About 2 hrs to fix

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

            Tree.prototype.constructProperty = function(encoded) {
              var propertyDescriptor = {
                type: encoded ? "Property" : "RawProperty",
                value: "",
                args: [],
          Severity: Minor
          Found in lib/tree.js - About 1 hr to fix

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

              Tree.prototype.constructFilter = function(root) {
                var current = {
                  type: "Filter",
                  args: []
                };
            Severity: Minor
            Found in lib/tree.js - About 1 hr to fix

              Function constructExtend has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                Tree.prototype.constructExtend = function(root) {
                  root.type = "ExtendExpression";
              
                  // What to return to the compiler.
                  var value = {
              Severity: Minor
              Found in lib/tree.js - About 1 hr to fix

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

                  Tree.prototype.constructExpression = function(root, END) {
                    var expressionRoot = {
                      nodes: []
                    };
                
                
                Severity: Minor
                Found in lib/tree.js - About 1 hr to fix

                  Function constructPartial has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    Tree.prototype.constructPartial = function(root) {
                      root.type = "PartialExpression";
                  
                      // By default isolate the partial from the parent's data.
                      root.value = "";
                  Severity: Minor
                  Found in lib/tree.js - About 1 hr to fix

                    There are no issues that match your filters.

                    Category
                    Status