Showing 726 of 2,177 total issues
File contact-api-client.service.spec.js
has 1093 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
/* global chai: false */
var expect = chai.expect;
File time-zone-selector.constants.js
has 1057 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
(function() {
'use strict';
angular.module('esn.datetime')
.constant('ESN_DATETIME_TIMEZONE', [
File app.controllers.spec.js
has 1005 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
/* global chai: false */
/* global sinon: false */
File message.js
has 969 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
angular.module('esn.message')
.constant('ESN_MESSAGE_TYPES', ['whatsup', 'event', 'poll'])
.constant('ESN_MESSAGE_DEFAULT_POLL_CHOICES', [{ label: '' }, { label: '' }])
Function exports
has 430 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(collaborationModule) {
return {
addMember,
addMembers,
addMembershipRequest,
Function exports
has 429 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(dependencies) {
const logger = dependencies('logger');
const contactModule = dependencies('contact');
const proxy = require('../proxy')(dependencies)(PATH);
const avatarHelper = require('./avatarHelper')(dependencies);
File addressbook-acl-helper.servive.spec.js
has 761 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
/* global chai: false */
var expect = chai.expect;
File contact-list.controller.spec.js
has 745 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
/* global chai: false */
/* global sinon: false */
Function ContactAPIClient
has 338 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ContactAPIClient(
$q,
uuid4,
AddressbookShell,
ContactShell,
File contact.service.spec.js
has 694 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
/* global chai, sinon: false */
var expect = chai.expect;
File addressbook.service.spec.js
has 685 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
/* global chai: false */
/* global sinon: false */
Function exports
has 304 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
// must be run at the top
timeGrunt(grunt);
var gruntfileUtils = new GruntfileUtils(grunt, servers);
Function exports
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
Open
module.exports = function(collaborationModule) {
return {
addMember,
addMembers,
addMembershipRequest,
- 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 234 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = (dependencies, options = {}) => {
const logger = dependencies('logger');
const {
ESNToken,
Function contactAddressbookService
has 212 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function contactAddressbookService(
$q,
$window,
$log,
_,
Function gracePeriodService
has 203 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function gracePeriodService(
$timeout,
$log,
$q,
_,
Function boxOverlayManager
has 201 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function boxOverlayManager(_, $rootScope, $window, $compile, $http, $templateCache, notificationFactory, ESN_BOX_OVERLAY_MAX_WINDOWS) {
var boxTemplateUrl = '/views/modules/box-overlay/box-overlay.html';
var boxes = [];
return {
File core-frontend-injections.js
has 501 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const join = require('path').join;
const CORE_JS_URIPATH = '/js/modules';
const CORE_JS_BASEPATH = join(__dirname, '../../frontend', CORE_JS_URIPATH);
const injections = [
Function exports
has 198 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(lib, dependencies) {
var logger = dependencies('logger');
function getSenderAddress(emailtoken, callback) {
Function ContactListController
has 194 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ContactListController(
$q,
$log,
$scope,
$state,