vegantech/sims

View on GitHub

Showing 223 of 433 total issues

Avoid too many return statements within this function.
Open

                    return "DOMNodeList";
Severity: Major
Found in app/assets/javascripts/ie-console.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                                    return o.killEvent(e);
    Severity: Major
    Found in app/assets/javascripts/datepicker.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                      return '"' + result.replace('"', '\\"')
                                         .replace("\n", '\\n')
                                         .replace("\r", '\\r')
                             + '"';
      Severity: Major
      Found in app/assets/javascripts/ie-console.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                                        return o.killEvent(e);
        Severity: Major
        Found in app/assets/javascripts/datepicker.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                          return 'undefined';
          Severity: Major
          Found in app/assets/javascripts/ie-console.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                            return "unknown";
            Severity: Major
            Found in app/assets/javascripts/ie-console.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                              return "Array(length: " + result.length + ")";
              Severity: Major
              Found in app/assets/javascripts/ie-console.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                return 'function() {}';
                Severity: Major
                Found in app/assets/javascripts/ie-console.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                              return "Failed to format result: " + e.message;
                  Severity: Major
                  Found in app/assets/javascripts/ie-console.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                        return "Array";
                    Severity: Major
                    Found in app/assets/javascripts/ie-console.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                          return "object";
                      Severity: Major
                      Found in app/assets/javascripts/ie-console.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                                if(o.outOfRange(tmpDate)) return o.killEvent(e);
                        Severity: Major
                        Found in app/assets/javascripts/datepicker.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                                  return o.killEvent(e);
                          Severity: Major
                          Found in app/assets/javascripts/datepicker.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                            return "" + result;
                            Severity: Major
                            Found in app/assets/javascripts/ie-console.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                                      if ( kc < 37 || kc > 40 ) return true;
                              Severity: Major
                              Found in app/assets/javascripts/datepicker.js - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                          @messages << "Score is not between #{min} and #{max} #{line.to_s}" and return false
                                Severity: Major
                                Found in lib/automated_intervention.rb - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                        redirect_to students_url and return false
                                  Severity: Major
                                  Found in app/controllers/students_controller.rb - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                        check_for_duplicate(intervention,line) and return false
                                    Severity: Major
                                    Found in lib/automated_intervention.rb - About 30 mins to fix

                                      Function replaceWord has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      function replaceWord() {
                                          var wi = this.currentWordIndex;
                                          var ti = this.currentTextIndex;
                                          if( !this.wordWin ) {
                                              alert( 'Error: Word frame not available.' );
                                      Severity: Minor
                                      Found in app/assets/javascripts/spellerpages/spellChecker.js - About 25 mins to fix

                                      Cognitive Complexity

                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                      A method's cognitive complexity is based on a few simple rules:

                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                      • Code is considered more complex for each "break in the linear flow of the code"
                                      • Code is considered more complex when "flow breaking structures are nested"

                                      Further reading

                                      Function createPromptAndInput has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                          createPromptAndInput: function() {
                                              var container = document.createElement("div");
                                              container.innerHTML = "<table style=\"width: 100%\" cellspacing=\"0\" cellpadding=\"0\"><tr>" +
                                                  "<td width=\"25\" style=\"padding-top: 10px;\">&gt;&gt;&gt;</td>" +
                                                  "<td><input type=\"text\" /></td>" +
                                      Severity: Minor
                                      Found in app/assets/javascripts/ie-console.js - About 25 mins to fix

                                      Cognitive Complexity

                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                      A method's cognitive complexity is based on a few simple rules:

                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                      • Code is considered more complex for each "break in the linear flow of the code"
                                      • Code is considered more complex when "flow breaking structures are nested"

                                      Further reading

                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language