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');
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}`;
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) {
- Read upRead up
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,
};
- Read upRead up
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 = [];
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);
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');
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 = [];
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) {
- Read upRead up
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;
- Read upRead up
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.
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) {
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';
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;
- Read upRead up
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;
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,
};
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) {
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
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
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) {