Strider-CD/strider

View on GitHub

Showing 367 of 1,006 total issues

File job.js has 394 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

var _ = require('lodash');
var async = require('async');
var colorize = require('./colorize');
Severity: Minor
Found in modules/strider-runner-core/lib/job.js - About 5 hrs to fix

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

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

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

      module.exports = function (deps) {
          const runOpts = {
              server_name: deps.config().server_name,
          };
          function runTest(email, password, project, branch, message, deploy) {
      Severity: Minor
      Found in apps/strider/dist-lib/cli/lib/run-test.js - About 5 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 exports has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
      Open

      module.exports = function (deps) {
        const runOpts = {
          server_name: deps.config().server_name,
        };
      
      
      Severity: Minor
      Found in apps/strider/lib/cli/lib/run-test.js - About 5 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 renderProjects has 123 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function renderProjects(refresh, req, res) {
        const tasks = [];
        const repomap = {};
        const configured = {};
        const unconfigured = [];
      Severity: Major
      Found in apps/strider/lib/routes/projects.js - About 4 hrs to fix

        Function AccountController has 120 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function AccountController($scope, $window) {
          $scope.user = user;
          $scope.providers = providers;
          $scope.accounts = setupAccounts($scope.user);
        
        
        Severity: Major
        Found in clients/classic-ui/client/account/controllers/account.js - About 4 hrs to fix

          File app.js has 362 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          // The Strider (web) app.
          
          const debug = require('debug')('strider');
          const chalk = require('chalk');
          const express = require('express');
          Severity: Minor
          Found in apps/strider/lib/app.js - About 4 hrs to fix

            Function renderProjects has 112 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function renderProjects(refresh, req, res) {
                const tasks = [];
                const repomap = {};
                const configured = {};
                const unconfigured = [];
            Severity: Major
            Found in apps/strider/dist-lib/routes/projects.js - About 4 hrs to fix

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

              module.exports = function (deps) {
                  const saveUser = require('./save-user')(deps);
                  function addUser(email, password, admin, force) {
                      let level = admin ? 1 : 0;
                      if (!email || !password) {
              Severity: Minor
              Found in apps/strider/dist-lib/cli/lib/add-user.js - About 4 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 exports has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
              Open

              module.exports = function (deps) {
                const saveUser = require('./save-user')(deps);
              
                function addUser(email, password, admin, force) {
                  let level = admin ? 1 : 0;
              Severity: Minor
              Found in apps/strider/lib/cli/lib/add-user.js - About 4 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

              File install-run.js has 344 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              "use strict";
              // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
              // See the @microsoft/rush package's LICENSE file for license information.
              Object.defineProperty(exports, "__esModule", { value: true });
              // THIS FILE WAS GENERATED BY A TOOL. ANY MANUAL MODIFICATIONS WILL GET OVERWRITTEN WHENEVER RUSH IS UPGRADED.
              Severity: Minor
              Found in common/scripts/install-run.js - About 4 hrs to fix

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

                module.exports = function (extdir, c, callback) {
                  const appConfig = config;
                  let k;
                  // override with c
                  for (k in c) {
                Severity: Major
                Found in apps/strider/lib/index.js - About 4 hrs to fix

                  Function HerokuController has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function HerokuController($scope) {
                    $scope.heroku = $scope.panelData.heroku;
                    $scope.deploy_on_green = ($scope.repo.prod_deploy_target ?
                      $scope.repo.prod_deploy_target.deploy_on_green : true);
                    $scope.status = $scope.heroku ? 'configured' : 'unconfigured';
                  Severity: Major
                  Found in clients/classic-ui/client/config/controllers/heroku.js - About 4 hrs to fix

                    Function BranchesController has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                    Open

                    function BranchesController($scope) {
                      $scope.branchName = '';
                      $scope.branches = branches;
                      $scope.allBranches = allBranches;
                    
                    
                    Severity: Minor
                    Found in clients/classic-ui/client/config/controllers/branches.js - About 4 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 BranchesController has 101 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function BranchesController($scope) {
                      $scope.branchName = '';
                      $scope.branches = branches;
                      $scope.allBranches = allBranches;
                    
                    
                    Severity: Major
                    Found in clients/classic-ui/client/config/controllers/branches.js - About 4 hrs to fix

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

                      module.exports = function (deps) {
                        const runOpts = {
                          server_name: deps.config().server_name,
                        };
                      
                      
                      Severity: Major
                      Found in apps/strider/lib/cli/lib/run-test.js - About 3 hrs to fix

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

                        module.exports = function (deps) {
                            const runOpts = {
                                server_name: deps.config().server_name,
                            };
                            function runTest(email, password, project, branch, message, deploy) {
                        Severity: Major
                        Found in apps/strider/dist-lib/cli/lib/run-test.js - About 3 hrs to fix

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

                                link: function (scope, element, attrs, ctrls) {
                                  var datepickerCtrl = ctrls[0], ngModel = ctrls[1];
                          
                                  if (!ngModel) {
                                    return; // do nothing if no ng-model
                          Severity: Major
                          Found in apps/strider/public/libs/ui-bootstrap.js - About 3 hrs to fix

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

                                  link: function (scope, element, attrs, ctrls) {
                                    var datepickerCtrl = ctrls[0], ngModel = ctrls[1];
                            
                                    if (!ngModel) {
                                      return; // do nothing if no ng-model
                            Severity: Major
                            Found in clients/classic-ui/public/libs/ui-bootstrap.js - About 3 hrs to fix

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

                              module.exports = function (extdir, c, callback) {
                                  const appConfig = config;
                                  let k;
                                  // override with c
                                  for (k in c) {
                              Severity: Major
                              Found in apps/strider/dist-lib/index.js - About 3 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language