Showing 182 of 306 total issues
Function userTime
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function userTime(attendeeColorsService, $interval, currentConferenceState, LOCAL_VIDEO_ID, moment) {
Function sendInvitation
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function sendInvitation(conference, creator, member, baseUrl, callback) {
Function updateMemberField
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function updateMemberField(conference, member, field, value, callback) {
Function drawAvatarIfVideoMuted
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function drawAvatarIfVideoMuted(currentConferenceState, attendeeColorsService, getCoordinatesOfCenteredImage, $log, drawHelper) {
Function localSpeakEmitter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function localSpeakEmitter($log, $rootScope, currentConferenceState, webRTCService, speakEventEmitterService) {
Function localCameraScreenshot
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function localCameraScreenshot(LOCAL_VIDEO_ID, DEFAULT_AVATAR_SIZE, currentConferenceState, newCanvas, newImage) {
Function testPropsAll
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function testPropsAll(prop, prefixed, elem, value, skipValueTest) {
Function writeMediaSection
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function writeMediaSection(transceiver, caps, type, stream, dtlsRole) {
Function inviteMembers
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function inviteMembers(conf, user, members, baseUrl, callback) {
Function invite
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function invite(conference, creator, members, baseUrl, callback) {
Function conferenceMobileVideo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function conferenceMobileVideo($timeout, $window, $rootScope, drawVideo, currentConferenceState) {
Function exports
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(dependencies) {
'use strict';
var logger = dependencies('logger');
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
module.exports = dependencies => {
const logger = dependencies('logger');
const config = require('../../core/esn-config');
return {
- 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
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return adapter;
Avoid too many return
statements within this function. Open
return Promise.reject(makeError('OperationError',
'Can not add ICE candidate'));
Avoid too many return
statements within this function. Open
return Promise.reject(makeError('OperationError',
'Can not add ICE candidate'));
Avoid too many return
statements within this function. Open
return Promise.resolve();
Function mongooseConnect
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function mongooseConnect(reinit) {
var defaultConfig = config('default');
if (defaultConfig.db && defaultConfig.db.reconnectOnConfigurationChange) {
if (!dbConfigWatcher) {
dbConfigWatcher = configurationWatcher(logger, getDbConfigurationFile(), reinit);
- 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"