mcfiredrill/forttree

View on GitHub
app/assets/javascripts/caret/jquery.caret.js

Summary

Maintainability
A
3 hrs
Test Coverage

Function caret has 61 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  $.fn.caret = function(pos) {
    var target = this[0];
    var isContentEditable = target.contentEditable === 'true';
    //get
    if (arguments.length == 0) {
Severity: Major
Found in app/assets/javascripts/caret/jquery.caret.js - About 2 hrs to fix

    Avoid too many return statements within this function.
    Open

            return target.selectionStart;
    Severity: Major
    Found in app/assets/javascripts/caret/jquery.caret.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return 0;
      Severity: Major
      Found in app/assets/javascripts/caret/jquery.caret.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            return this;
        Severity: Major
        Found in app/assets/javascripts/caret/jquery.caret.js - About 30 mins to fix

          There are no issues that match your filters.

          Category
          Status