vegantech/sims

View on GitHub

Showing 223 of 433 total issues

Avoid too many return statements within this function.
Open

                    return "DOMNodeList: [" + out + ']';
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 '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 false;
        Severity: Major
        Found in app/assets/javascripts/jquery_ujs.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 '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 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 "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 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 "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 "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 '"' + 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 "DOMElement";
                            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 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 _getTotalReplaced has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      function _getTotalReplaced() {
                                          var i_replaced = 0;
                                          for( var i = 0; i < this.wordFlags.length; i++ ) {
                                              for( var j = 0; j < this.wordFlags[i].length; j++ ) {
                                                  if(( this.wordFlags[i][j] == this.replWordFlag )
                                      Severity: Minor
                                      Found in public/speller/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 _getFormInputs has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      function _getFormInputs( inputPattern ) {
                                          var inputs = new Array();
                                          for( var i = 0; i < document.forms.length; i++ ) {
                                              for( var j = 0; j < document.forms[i].elements.length; j++ ) {
                                                  if( document.forms[i].elements[j].type.match( inputPattern )) {
                                      Severity: Minor
                                      Found in public/speller/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

                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language