Showing 367 of 1,006 total issues
File strider-ui.js
has 2076 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
;define("strider-ui/adapters/-json-api", ["exports", "@ember-data/adapter/json-api"], function (_exports, _jsonApi) {
File ui-bootstrap.js
has 1170 lines of code (exceeds 250 allowed). Consider refactoring. Open
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',
File ui-bootstrap.js
has 1170 lines of code (exceeds 250 allowed). Consider refactoring. Open
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',
Function ConfigController
has 482 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ConfigController($scope) {
// this is the parent controller.
$scope.project = project;
$scope.plugins = plugins;
$scope.runners = runners;
Function ConfigController
has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring. Open
Open
function ConfigController($scope) {
// this is the parent controller.
$scope.project = project;
$scope.plugins = plugins;
$scope.runners = runners;
- 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 init
has 293 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.init = function (config) {
const mongoose = setupDb(config, (err) => {
if (err) {
process.exit(1);
}
File config.js
has 517 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
var $ = require('jquery');
var _ = require('lodash');
var md5 = require('md5');
Function exports
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
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();
- 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 link
has 173 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function (scope, element, attrs, ngModel) {
if ( !ngModel ) {
return; // do nothing if no ng-model
}
Function link
has 173 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function (scope, element, attrs, ngModel) {
if ( !ngModel ) {
return; // do nothing if no ng-model
}
Function init
has 173 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.init = function (config) {
const mongoose = setupDb(config, (err) => {
if (err) {
process.exit(1);
}
File from0to1.js
has 432 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const models = require('../');
const Job = models.Job;
const User = models.User;
const Project = models.Project;
const async = require('async');
Function createProject
has 153 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
exports.createProject = function (req, res, next) {
if (req.params.org === 'auth') {
return next();
}
File from0to1.js
has 418 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const models = require('../');
const Job = models.Job;
const User = models.User;
const Project = models.Project;
Function exports
has 148 lines of code (exceeds 25 allowed). Consider refactoring. Open
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();
Function link
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link:function (originalScope, element, attrs, modelCtrl) {
//SUPPORTED ATTRIBUTES (OPTIONS)
//minimal no of characters that needs to be entered before typeahead kicks-in
Function link
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link:function (originalScope, element, attrs, modelCtrl) {
//SUPPORTED ATTRIBUTES (OPTIONS)
//minimal no of characters that needs to be entered before typeahead kicks-in
Function link
has 138 lines of code (exceeds 25 allowed). Consider refactoring. Open
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;
Function link
has 138 lines of code (exceeds 25 allowed). Consider refactoring. Open
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;
File user.ts
has 395 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import bcrypt from 'bcryptjs';
import Activedirectory from 'activedirectory';
import { Schema, model, Document, Model } from 'mongoose';
import config from '../config';
import InviteCode from './invite';