Strider-CD/strider

View on GitHub

Showing 367 of 1,006 total issues

File strider-ui.js has 2076 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';



;define("strider-ui/adapters/-json-api", ["exports", "@ember-data/adapter/json-api"], function (_exports, _jsonApi) {
Severity: Major
Found in apps/strider/dist/ember/assets/strider-ui.js - About 5 days to fix

    File ui-bootstrap.js has 1170 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    angular.module('ui.bootstrap', ['ui.bootstrap.buttons','ui.bootstrap.position','ui.bootstrap.datepicker','ui.bootstrap.pagination','ui.bootstrap.rating','ui.bootstrap.timepicker','ui.bootstrap.bindHtml','ui.bootstrap.typeahead']);
    angular.module('ui.bootstrap.buttons', [])
    
      .constant('buttonConfig', {
        activeClass:'active',
    Severity: Major
    Found in clients/classic-ui/public/libs/ui-bootstrap.js - About 3 days to fix

      File ui-bootstrap.js has 1170 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      angular.module('ui.bootstrap', ['ui.bootstrap.buttons','ui.bootstrap.position','ui.bootstrap.datepicker','ui.bootstrap.pagination','ui.bootstrap.rating','ui.bootstrap.timepicker','ui.bootstrap.bindHtml','ui.bootstrap.typeahead']);
      angular.module('ui.bootstrap.buttons', [])
      
        .constant('buttonConfig', {
          activeClass:'active',
      Severity: Major
      Found in apps/strider/public/libs/ui-bootstrap.js - About 3 days to fix

        Function ConfigController has 482 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function ConfigController($scope) {
          // this is the parent controller.
          $scope.project = project;
          $scope.plugins = plugins;
          $scope.runners = runners;
        Severity: Major
        Found in clients/classic-ui/client/config/controllers/config.js - About 2 days to fix

          Function ConfigController has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring.
          Open

          function ConfigController($scope) {
            // this is the parent controller.
            $scope.project = project;
            $scope.plugins = plugins;
            $scope.runners = runners;
          Severity: Minor
          Found in clients/classic-ui/client/config/controllers/config.js - About 2 days 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 init has 293 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          exports.init = function (config) {
            const mongoose = setupDb(config, (err) => {
              if (err) {
                process.exit(1);
              }
          Severity: Major
          Found in apps/strider/lib/app.js - About 1 day to fix

            File config.js has 517 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            'use strict';
            
            var $ = require('jquery');
            var _ = require('lodash');
            var md5 = require('md5');
            Severity: Major
            Found in clients/classic-ui/client/config/controllers/config.js - About 1 day to fix

              Function exports has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
              Open

              module.exports = function($scope, $route, $location, $filter) {
                var params = $route.current ? $route.current.params : {};
                var project = global.project;
                var jobid = params.id || (global.job && global.job._id);
                var socket = io.connect();
              Severity: Minor
              Found in clients/classic-ui/client/job-status/controllers/job.js - About 7 hrs 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 link has 173 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    link: function (scope, element, attrs, ngModel) {
                      if ( !ngModel ) {
                        return; // do nothing if no ng-model
                      }
              
              
              Severity: Major
              Found in clients/classic-ui/public/libs/ui-bootstrap.js - About 6 hrs to fix

                Function link has 173 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      link: function (scope, element, attrs, ngModel) {
                        if ( !ngModel ) {
                          return; // do nothing if no ng-model
                        }
                
                
                Severity: Major
                Found in apps/strider/public/libs/ui-bootstrap.js - About 6 hrs to fix

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

                  exports.init = function (config) {
                      const mongoose = setupDb(config, (err) => {
                          if (err) {
                              process.exit(1);
                          }
                  Severity: Major
                  Found in apps/strider/dist-lib/app.js - About 6 hrs to fix

                    File from0to1.js has 432 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    const models = require('../');
                    const Job = models.Job;
                    const User = models.User;
                    const Project = models.Project;
                    const async = require('async');
                    Severity: Minor
                    Found in apps/strider/dist-lib/models/upgrade/from0to1.js - About 6 hrs to fix

                      Function createProject has 153 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      exports.createProject = function (req, res, next) {
                        if (req.params.org === 'auth') {
                          return next();
                        }
                      
                      
                      Severity: Major
                      Found in apps/strider/lib/routes/api/repo.js - About 6 hrs to fix

                        File from0to1.js has 418 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        const models = require('../');
                        const Job = models.Job;
                        const User = models.User;
                        const Project = models.Project;
                        
                        
                        Severity: Minor
                        Found in apps/strider/lib/models/upgrade/from0to1.js - About 6 hrs to fix

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

                          module.exports = function($scope, $route, $location, $filter) {
                            var params = $route.current ? $route.current.params : {};
                            var project = global.project;
                            var jobid = params.id || (global.job && global.job._id);
                            var socket = io.connect();
                          Severity: Major
                          Found in clients/classic-ui/client/job-status/controllers/job.js - About 5 hrs to fix

                            Function link has 140 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    link:function (originalScope, element, attrs, modelCtrl) {
                            
                                      //SUPPORTED ATTRIBUTES (OPTIONS)
                            
                                      //minimal no of characters that needs to be entered before typeahead kicks-in
                            Severity: Major
                            Found in clients/classic-ui/public/libs/ui-bootstrap.js - About 5 hrs to fix

                              Function link has 140 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      link:function (originalScope, element, attrs, modelCtrl) {
                              
                                        //SUPPORTED ATTRIBUTES (OPTIONS)
                              
                                        //minimal no of characters that needs to be entered before typeahead kicks-in
                              Severity: Major
                              Found in apps/strider/public/libs/ui-bootstrap.js - About 5 hrs to fix

                                Function link has 138 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        link: function (originalScope, element, attrs, ngModel) {
                                
                                          var closeOnDateSelection = angular.isDefined(attrs.closeOnDateSelection) ? scope.$eval(attrs.closeOnDateSelection) : datepickerPopupConfig.closeOnDateSelection;
                                          var dateFormat = attrs.datepickerPopup || datepickerPopupConfig.dateFormat;
                                
                                
                                Severity: Major
                                Found in apps/strider/public/libs/ui-bootstrap.js - About 5 hrs to fix

                                  Function link has 138 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          link: function (originalScope, element, attrs, ngModel) {
                                  
                                            var closeOnDateSelection = angular.isDefined(attrs.closeOnDateSelection) ? scope.$eval(attrs.closeOnDateSelection) : datepickerPopupConfig.closeOnDateSelection;
                                            var dateFormat = attrs.datepickerPopup || datepickerPopupConfig.dateFormat;
                                  
                                  
                                  Severity: Major
                                  Found in clients/classic-ui/public/libs/ui-bootstrap.js - About 5 hrs to fix

                                    File user.ts has 395 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    import bcrypt from 'bcryptjs';
                                    import Activedirectory from 'activedirectory';
                                    import { Schema, model, Document, Model } from 'mongoose';
                                    import config from '../config';
                                    import InviteCode from './invite';
                                    Severity: Minor
                                    Found in apps/strider/lib/models/user.ts - About 5 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language