Showing 5 of 5 total issues

Function handlers has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function handlers(config) {
 
var Model = database({
connection: config.connection
});
Severity: Minor
Found in handlers.js - About 2 hrs to fix

    Function redisAdaptor has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var redisAdaptor = function (config) {
    "use strict";
     
    var redis = config.connection;
    var client;
    Severity: Minor
    Found in redisAdaptor.js - About 1 hr to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      $('#usernameInput').keypress(function(e){
      if(e.keyCode == 13) {
      $('#submitUsername').click();
      return false; //prevents a linebreak being added by enter key
      }
      Severity: Major
      Found in script.js and 1 other location - About 1 hr to fix
      script.js on lines 112..117

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      $('#newClapInput').keypress(function(e){
      if(e.keyCode == 13) {
      $('#submitButton').click();
      return false; //prevents a linebreak being added by enter key
      }
      Severity: Major
      Found in script.js and 1 other location - About 1 hr to fix
      script.js on lines 119..124

      Function routing has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      function routing(config) {
      "use strict";
      handlers = handlers(config);
      return {
      router: function (req, res){
      Severity: Minor
      Found in router.js - About 35 mins to fix
      Severity
      Category
      Status
      Source
      Language