krafthaus/bauhaus

View on GitHub
bower_components/tinymce/plugins/fullpage/plugin.js

Summary

Maintainability
D
2 days
Test Coverage

Function dataToHtml has 153 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function dataToHtml(data) {
        var headerFragment, headElement, html, elm, value, dom = editor.dom;

        function setAttr(elm, name, value) {
            elm.attr(name, value ? value : undefined);
Severity: Major
Found in bower_components/tinymce/plugins/fullpage/plugin.js - About 6 hrs to fix

    File plugin.js has 363 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * plugin.js
     *
     * Copyright, Moxiecode Systems AB
     * Released under LGPL License.
    Severity: Minor
    Found in bower_components/tinymce/plugins/fullpage/plugin.js - About 4 hrs to fix

      Function setContent has 81 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function setContent(evt) {
              var startPos, endPos, content = evt.content, headerFragment, styles = '', dom = editor.dom, elm;
      
              if (evt.selection) {
                  return;
      Severity: Major
      Found in bower_components/tinymce/plugins/fullpage/plugin.js - About 3 hrs to fix

        Function htmlToData has 52 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function htmlToData() {
                var headerFragment = parseHeader(), data = {}, elm, matches;
        
                function getAttr(elm, name) {
                    var value = elm.attr(name);
        Severity: Major
        Found in bower_components/tinymce/plugins/fullpage/plugin.js - About 2 hrs to fix

          Consider simplifying this complex logical expression.
          Open

                  if (elm) {
                      dom.setAttribs(editor.getBody(), {
                          style: elm.attr('style') || '',
                          dir: elm.attr('dir') || '',
                          vLink: elm.attr('vlink') || '',
          Severity: Major
          Found in bower_components/tinymce/plugins/fullpage/plugin.js - About 40 mins to fix

            There are no issues that match your filters.

            Category
            Status