team-umlaut/umlaut

View on GitHub
app/assets/javascripts/umlaut/update_html.js

Summary

Maintainability
C
7 hrs
Test Coverage

Function HtmlUpdater has 91 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function HtmlUpdater(first_arg, second_arg, third_arg) {
    if (typeof(first_arg) == "object") {
      // Simply merge arguments object as properties on ourselves. 
     $.extend(this, first_arg);
    } else {
Severity: Major
Found in app/assets/javascripts/umlaut/update_html.js - About 3 hrs to fix

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

        this.update = function() {
          // Need to capture because we won't have 'this' inside the ajax
          // success handler. 
          var myself = this;       
          var dataType = this.is_remote_url( this.umlaut_uri ) ? "jsonp" : "json";
    Severity: Minor
    Found in app/assets/javascripts/umlaut/update_html.js - About 2 hrs to fix

      Function success has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                   success: function(umlaut_response) {
                    for (var i = 0; i < myself.section_targets.length; i++) {
                        var section_target = myself.section_targets[i];                                
                       
                        var umlaut_html_section = myself.find_umlaut_response_section(umlaut_response, section_target.umlaut_section_id);
      Severity: Minor
      Found in app/assets/javascripts/umlaut/update_html.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status