adobe/brackets

View on GitHub
src/language/HTMLDOMDiff.js

Summary

Maintainability
D
1 day
Test Coverage

Function generateChildEdits has 211 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var generateChildEdits = function (oldParent, oldNodeMap, newParent, newNodeMap) {
        /*jslint continue: true */

        var newIndex = 0,
            oldIndex = 0,
Severity: Major
Found in src/language/HTMLDOMDiff.js - About 1 day to fix

    File HTMLDOMDiff.js has 298 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * Copyright (c) 2013 - present Adobe Systems Incorporated. All rights reserved.
     *
     * Permission is hereby granted, free of charge, to any person obtaining a
     * copy of this software and associated documentation files (the "Software"),
    Severity: Minor
    Found in src/language/HTMLDOMDiff.js - About 3 hrs to fix

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

          function domdiff(oldNode, newNode) {
              var queue = [],
                  edits = [],
                  moves = [],
                  newElement,
      Severity: Major
      Found in src/language/HTMLDOMDiff.js - About 2 hrs to fix

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

                var addTextDelete = function () {
                    var prev = prevNode();
                    if (prev && !prev.children) {
                        newEdit = {
                            type: "textReplace",
        Severity: Minor
        Found in src/language/HTMLDOMDiff.js - About 1 hr to fix

          Avoid deeply nested control flow statements.
          Open

                                  if (!addElementDelete()) {
                                      // Since we're not deleting and these elements don't match up, we
                                      // must have a new element. Add an elementInsert (and log a problem
                                      // if no insert works.)
                                      if (!addElementInsert()) {
          Severity: Major
          Found in src/language/HTMLDOMDiff.js - About 45 mins to fix

            There are no issues that match your filters.

            Category
            Status