step1profit/r.js

View on GitHub

Showing 4 of 6 total issues

Function R has 125 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  var R = root.R = (function(){
    var instance;

    function init(){
      // http://stackoverflow.com/a/18560314
Severity: Major
Found in r.js - About 5 hrs to fix

    Function init has 115 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function init(){
          // http://stackoverflow.com/a/18560314
          if (!Object.keys) {
            Object.keys = function (obj) {
              var arr = [], key;
    Severity: Major
    Found in r.js - About 4 hrs to fix

      Avoid too many return statements within this function.
      Open

              return false;
      Severity: Major
      Found in r.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return true;
        Severity: Major
        Found in r.js - About 30 mins to fix
          Severity
          Category
          Status
          Source
          Language