appirio-tech/lc1-challenge-service

View on GitHub

Showing 10 of 35 total issues

Function exports has 123 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function(grunt) {
  var databaseUrl;

  var re;
  var swagger;
Severity: Major
Found in Gruntfile.js - About 4 hrs to fix

    Function getSubmissionFileURL has 85 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var getSubmissionFileURL = function(method, req, res, next) {
      var challengeId = req.swagger.params.challengeId.value;
      var submissionId = req.swagger.params.submissionId.value;
      var user = auth.getSigninUser(req);
      var fileId = req.swagger.params.fileId.value;
    Severity: Major
    Found in api/controllers/storage.js - About 3 hrs to fix

      Function getChallengeFileURL has 84 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var getChallengeFileURL = function(method, req, res, next) {
        // check authorization
        var challengeId = req.swagger.params.challengeId.value;
        var fileId = req.swagger.params.fileId.value;
        var user = auth.getSigninUser(req);
      Severity: Major
      Found in api/controllers/storage.js - About 3 hrs to fix

        Function exports has 65 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        module.exports = function(sequelize, DataTypes) {
        
          var Scorecard = sequelize.define('Scorecard', {
            // primary key
            id: {
        Severity: Major
        Found in api/models/scorecard.js - About 2 hrs to fix

          Function exports has 63 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          module.exports = function(sequelize, DataTypes) {
          
            var Challenge = sequelize.define('Challenge', {
              // primary key
              id: {
          Severity: Major
          Found in api/models/challenge.js - About 2 hrs to fix

            Function exports has 48 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            module.exports = function(sequelize, DataTypes) {
              var File = sequelize.define('File', {
                // primary key
                id: {
                  type: DataTypes.BIGINT, primaryKey: true, autoIncrement: true,
            Severity: Minor
            Found in api/models/file.js - About 1 hr to fix

              Function exports has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              module.exports = function(sequelize, DataTypes) {
                var Submission = sequelize.define('Submission', {
                  // primary key
                  id: {
                    type: DataTypes.BIGINT, primaryKey: true, autoIncrement: true,
              Severity: Minor
              Found in api/models/submission.js - About 1 hr to fix

                Function exports has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                module.exports = function(sequelize, DataTypes) {
                  var Participant = sequelize.define('Participant', {
                    // primary key
                    id: {
                      type: DataTypes.BIGINT, primaryKey: true, autoIncrement: true,
                Severity: Minor
                Found in api/models/participant.js - About 1 hr to fix

                  Function exports has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  module.exports = function(sequelize, DataTypes) {
                  
                    var ScorecardItem = sequelize.define('ScorecardItem', {
                      // primary key
                      id: {
                  Severity: Minor
                  Found in api/models/scorecardItem.js - About 1 hr to fix

                    Function exports has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    module.exports = function(sequelize, DataTypes) {
                    
                      var Requirement = sequelize.define('Requirement', {
                        // primary key
                        id: {
                    Severity: Minor
                    Found in api/models/requirement.js - About 1 hr to fix
                      Severity
                      Category
                      Status
                      Source
                      Language