joshsoftware/code-curiosity

View on GitHub
app/assets/javascripts/mustache.js

Summary

Maintainability
D
1 day
Test Coverage

File mustache.js has 383 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * mustache.js - Logic-less {{mustache}} templates with JavaScript
 * http://github.com/janl/mustache.js
 */

Severity: Minor
Found in app/assets/javascripts/mustache.js - About 5 hrs to fix

    Function parseTemplate has 83 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function parseTemplate(template, tags) {
        template = template || '';
        tags = tags || mustache.tags;
    
        if (typeof tags === 'string') tags = tags.split(spaceRe);
    Severity: Major
    Found in app/assets/javascripts/mustache.js - About 3 hrs to fix

      Function renderTokens has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function renderTokens(tokens, writer, context, template) {
          var buffer = '';
      
          // This function is used to render an artbitrary template
          // in the current context by higher-order functions.
      Severity: Major
      Found in app/assets/javascripts/mustache.js - About 2 hrs to fix

        Avoid deeply nested control flow statements.
        Open

                    for (var j = 0, jlen = value.length; j < jlen; ++j) {
                      buffer += renderTokens(token[4], writer, context.push(value[j]), template);
                    }
        Severity: Major
        Found in app/assets/javascripts/mustache.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                  } else if (value) {
                    buffer += renderTokens(token[4], writer, context, template);
                  }
          Severity: Major
          Found in app/assets/javascripts/mustache.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                      } else if (value) {
                        buffer += renderTokens(token[4], writer, context.push(value), template);
                      }
            Severity: Major
            Found in app/assets/javascripts/mustache.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                        if (value != null) buffer += value;
              Severity: Major
              Found in app/assets/javascripts/mustache.js - About 45 mins to fix

                There are no issues that match your filters.

                Category
                Status