ncbo/bioportal_web_ui

View on GitHub
public/browse/lib/lunr.js/example/mustache.js

Summary

Maintainability
C
1 day
Test Coverage

File mustache.js has 354 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 public/browse/lib/lunr.js/example/mustache.js - About 4 hrs to fix

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

      function parseTemplate(template, tags) {
        tags = tags || mustache.tags;
        template = template || '';
    
        if (typeof tags === 'string') {
    Severity: Major
    Found in public/browse/lib/lunr.js/example/mustache.js - About 3 hrs to fix

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

        Writer.prototype.renderTokens = function (tokens, context, partials, originalTemplate) {
          var buffer = '';
      
          // This function is used to render an arbitrary template
          // in the current context by higher-order sections.
      Severity: Major
      Found in public/browse/lib/lunr.js/example/mustache.js - About 2 hrs to fix

        Avoid deeply nested control flow statements.
        Open

                  if (value != null) buffer += value;
        Severity: Major
        Found in public/browse/lib/lunr.js/example/mustache.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                    if (typeof originalTemplate !== 'string') {
                      throw new Error('Cannot use higher-order sections without the original template');
                    }
          Severity: Major
          Found in public/browse/lib/lunr.js/example/mustache.js - About 45 mins to fix

            There are no issues that match your filters.

            Category
            Status