Showing 182 of 306 total issues
Function exports
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
grunt.registerMultiTask('splitfiles', 'split the files and run separate targets', function() {
var options = this.options({
chunk: 50,
- 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 invitationDialogController
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
$scope,
$log,
$mdDialog,
notificationFactory,
conferenceAPI,
Function localSpeakWhileMuted
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function localSpeakWhileMuted($log, $rootScope, session, currentConferenceState, speakEventEmitterService, notificationFactory, LOCAL_VIDEO_ID) {
Avoid deeply nested control flow statements. Open
Open
for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) {
featureNames.push(feature.options.aliases[aliasIdx].toLowerCase());
}
Function getConnectionString
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function getConnectionString(hostname, port, dbname, username, password, connectionOptions) {
Avoid deeply nested control flow statements. Open
Open
if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {
Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);
}
Function _createInterface
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
Pubsub.prototype._createInterface = function(topic) {
var self = this;
return {
subscribe: function(handler) {
if (!self.client) {
- 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 validateConnection
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function validateConnection(hostname, port, dbname, username, password, callback) {
Function conferenceAttendeeVideo
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function conferenceAttendeeVideo(webRTCService, currentConferenceState, matchmedia, $timeout, drawVideo, LOCAL_VIDEO_ID) {
Function scaleToCanvas
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
function scaleToCanvas($interval, $window, cropDimensions, drawAvatarIfVideoMuted, drawHelper, currentConferenceState) {
Avoid deeply nested control flow statements. Open
Open
if (!streams[remoteMsid.stream]) {
streams[remoteMsid.stream] = new window.MediaStream();
Object.defineProperty(streams[remoteMsid.stream], 'id', {
get: function() {
return remoteMsid.stream;
Avoid deeply nested control flow statements. Open
Open
if (this.transceivers[i].mid === candidate.sdpMid) {
sdpMLineIndex = i;
break;
}
Avoid deeply nested control flow statements. Open
Open
if (!streams.default) {
streams.default = new window.MediaStream();
}
Avoid deeply nested control flow statements. Open
Open
if (!streams[remoteMsid.stream]) {
streams[remoteMsid.stream] = new window.MediaStream();
}
Avoid deeply nested control flow statements. Open
Open
if (!streams.default) {
streams.default = new window.MediaStream();
}
Avoid deeply nested control flow statements. Open
Open
if (!maybeAddCandidate(transceiver.iceTransport, cand)) {
return Promise.reject(makeError('OperationError',
'Can not add ICE candidate'));
}
Avoid deeply nested control flow statements. Open
Open
if (server.hasOwnProperty('urls')) {
for (var j = 0; j < server.urls.length; j++) {
var newServer = {
url: server.urls[j]
};
Consider simplifying this complex logical expression. Open
Open
} else if (typeof window === 'object' && window.RTCPeerConnection &&
'getSenders' in window.RTCPeerConnection.prototype &&
'createDTMFSender' in window.RTCPeerConnection.prototype &&
window.RTCRtpSender &&
!('dtmf' in window.RTCRtpSender.prototype)) {
Consider simplifying this complex logical expression. Open
Open
if (typeof window === 'object' && window.RTCPeerConnection &&
!('getSenders' in window.RTCPeerConnection.prototype) &&
'createDTMFSender' in window.RTCPeerConnection.prototype) {
var shimSenderWithDtmf = function(pc, track) {
return {
Consider simplifying this complex logical expression. Open
Open
if ((description.type === 'offer' || description.type === 'answer') &&
!rejected && usingBundle && sdpMLineIndex > 0 &&
pc.transceivers[sdpMLineIndex]) {
pc._disposeIceAndDtlsTransports(sdpMLineIndex);
pc.transceivers[sdpMLineIndex].iceGatherer =