newscoop/JS-Scoopwriter

View on GitHub
app/scripts/directives/sf-aloha-format-link.js

Summary

Maintainability
D
1 day
Test Coverage

Function directiveConstructor has 175 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function directiveConstructor($rootScope, $modal, $window, toaster) {
        var template = [
            '<div>',
            '  <button class="btn btn-default btn-sm" title="Add Link">',
            '      <i class="fa fa-link"></i>',
Severity: Major
Found in app/scripts/directives/sf-aloha-format-link.js - About 7 hrs to fix

    Function postLink has 156 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function postLink(scope, element, attrs) {
                var children,
                    cmdLinkEnabled,
                    cmdLinkSupported,
                    cmdUnlinkEnabled,
    Severity: Major
    Found in app/scripts/directives/sf-aloha-format-link.js - About 6 hrs to fix

      Function updateButtonsMode has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  function updateButtonsMode() {
                      var editables,
                          blocks,
                          selection = $window.getSelection(),
                          testRange,
      Severity: Minor
      Found in app/scripts/directives/sf-aloha-format-link.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status