Showing 182 of 306 total issues
Function 7
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"../utils.js":13}],7:[function(require,module,exports){
/*
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
File modernizr.js
has 383 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* modernizr v3.5.0
* Build https://modernizr.com/download?-datachannel-getusermedia-peerconnection-websockets-domprefixes-setclasses-dontmin
*
* Copyright (c)
Function createOffer
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
RTCPeerConnection.prototype.createOffer = function() {
var pc = this;
if (this._isClosed) {
return Promise.reject(makeError('InvalidStateError',
Function ConferenceState
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ConferenceState($rootScope, LOCAL_VIDEO_ID, REMOTE_VIDEO_IDS, newImage) {
/*
* Store a snapshot of current conference status and an array of attendees describing
* current visible attendees of the conference by their index as position.
* attendees : [{
Function shimPeerConnection
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
shimPeerConnection: function(window) {
var browserDetails = utils.detectBrowser(window);
if (typeof window !== 'object' || !(window.RTCPeerConnection ||
window.mozRTCPeerConnection)) {
Function exports
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
Open
module.exports = function(dependencies) {
var logger = dependencies('logger');
var errors = require('../errors')(dependencies);
const denormalizer = require('../denormalizers/conference')(dependencies);
- 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 start
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function start(callback) {
function listenCallback(server, err) {
if (server === webserver.server) { states.http4 = STARTED; }
if (server === webserver.sslserver) { states.ssl4 = STARTED; }
if (server === webserver.server6) { states.http6 = STARTED; }
Function 4
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"./adapter_factory.js":4}],4:[function(require,module,exports){
/*
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
Function exports
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(dependencies, opts) {
var window = dependencies && dependencies.window;
var options = {
shimChrome: true,
Function shimGetSendersWithDtmf
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
shimGetSendersWithDtmf: function(window) {
// Overrides addTrack/removeTrack, depends on shimAddTrackRemoveTrack.
if (typeof window === 'object' && window.RTCPeerConnection &&
!('getSenders' in window.RTCPeerConnection.prototype) &&
'createDTMFSender' in window.RTCPeerConnection.prototype) {
File Gruntfile.js
has 319 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
'use strict';
var fs = require('fs-extra');
var path = require('path');
var conf_path = './test/config/';
Function 13
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
},{"../utils":13}],13:[function(require,module,exports){
/*
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
Function liveConference
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function liveConference(
$log,
$timeout,
$interval,
session,
Function conferenceVideo
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function conferenceVideo($timeout, $window, $rootScope, drawVideo, currentConferenceState, LOCAL_VIDEO_ID, DEFAULT_AVATAR_SIZE, $state) {
return {
restrict: 'E',
replace: true,
templateUrl: '/views/modules/conference/conference-video.html',
Function exports
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(dependencies) {
var logger = dependencies('logger');
var errors = require('../errors')(dependencies);
Function setLocalDescription
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
RTCPeerConnection.prototype.setLocalDescription = function(description) {
var pc = this;
if (!isActionAllowedInSignalingState('setLocalDescription',
description.type, this.signalingState) || this._isClosed) {
Function shimLocalStreamsAPI
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
shimLocalStreamsAPI: function(window) {
if (typeof window !== 'object' || !window.RTCPeerConnection) {
return;
}
if (!('getLocalStreams' in window.RTCPeerConnection.prototype)) {
Function controller
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function controller($scope) {
$scope.conference = session.conference;
$scope.conferenceState = currentConferenceState;
$scope.conferenceId = $scope.conference._id;
$scope.reportedAttendee = null;
Function exports
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(dependencies) {
var logger = dependencies('logger'),
errors = require('../errors')(dependencies),
config = dependencies('config')('default');
Function link
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function link(scope, element) {
var canvas = {};
var context = {};
var mainVideo = {};
var currentVideoId = LOCAL_VIDEO_ID;