Showing 3,230 of 5,407 total issues
File sspBCBidAdapter.js
has 665 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { deepAccess, getWindowTop, isArray, logWarn } from '../src/utils.js';
import { ajax } from '../src/ajax.js';
import { config } from '../src/config.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
File adbookpspBidAdapter.js
has 664 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {find, includes} from '../src/polyfill.js';
import {config} from '../src/config.js';
import {BANNER, NATIVE, VIDEO} from '../src/mediaTypes.js';
import {getStorageManager} from '../src/storageManager.js';
import {
Function buildRequests
has 297 lines of code (exceeds 25 allowed). Consider refactoring. Open
buildRequests: function(validBidRequests, bidderRequest) {
if (!validBidRequests.length) {
return null;
}
let pageKeywords = null;
Function buildRequests
has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring. Open
buildRequests(validBidRequests, bidderRequest) {
// convert Native ORTB definition to old-style prebid native definition
validBidRequests = convertOrtbRequestToProprietaryNative(validBidRequests);
const secure = (location.protocol === 'https:') ? 1 : 0;
- 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
File videojsVideoProvider.js
has 643 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
SETUP_COMPLETE, SETUP_FAILED, DESTROYED,
PLAYLIST, PLAYBACK_REQUEST, CONTENT_LOADED, PLAY, PAUSE, TIME, SEEK_START, SEEK_END, MUTE, VOLUME, ERROR, COMPLETE,
FULLSCREEN, PLAYER_RESIZE,
AD_REQUEST, AD_IMPRESSION, AD_TIME, AD_COMPLETE, AD_SKIPPED, AD_CLICK, AD_STARTED, AD_ERROR, AD_LOADED, AD_PLAY, AD_PAUSE
File native.js
has 638 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
deepAccess,
deepClone, getDefinedParams,
insertHtmlIntoIframe,
isArray,
File pubmaticAnalyticsAdapter.js
has 636 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {_each, isArray, isStr, logError, logWarn, pick, generateUUID} from '../src/utils.js';
import adapter from '../libraries/analyticsAdapter/AnalyticsAdapter.js';
import adapterManager from '../src/adapterManager.js';
import { BID_STATUS, EVENTS, STATUS, REJECTION_REASON } from '../src/constants.js';
import {ajax} from '../src/ajax.js';
File 33acrossBidAdapter.js
has 631 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {registerBidder} from '../src/adapters/bidderFactory.js';
import {config} from '../src/config.js';
import {
deepAccess,
getWindowSelf,
File gridBidAdapter.js
has 623 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
isEmpty,
deepAccess,
logError,
parseGPTSingleSizeArrayToRtbSize,
Function buildRequests
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
buildRequests(validBidRequests, bidderRequest) {
this.loadConfiguredData(validBidRequests[0]);
this.propertyBag.buildRequestsStart = new Date().getTime();
logInfo(`buildRequests time: ${this.propertyBag.buildRequestsStart} v ${NEWSPASSVERSION} validBidRequests`, JSON.parse(JSON.stringify(validBidRequests)), 'bidderRequest', JSON.parse(JSON.stringify(bidderRequest)));
if (this.blockTheRequest()) {
- 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 buildRequests
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
buildRequests: function(bidRequests, bidderRequest) {
// var currency = config.getConfig(currency);
let buildRequest = (currentBidRequest, bidderRequest) => {
var zone = currentBidRequest.params.zoneId;
- 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
File operaadsBidAdapter.js
has 603 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
deepAccess,
deepSetValue,
generateUUID,
getDNT,
File yahoosspBidAdapter.js
has 602 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER, VIDEO } from '../src/mediaTypes.js';
import { deepAccess, isFn, isStr, isNumber, isArray, isEmpty, isPlainObject, generateUUID, logInfo, logWarn } from '../src/utils.js';
import { config } from '../src/config.js';
import { Renderer } from '../src/Renderer.js';
Function toOrtbNativeRequest
has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring. Open
export function toOrtbNativeRequest(legacyNativeAssets) {
if (!legacyNativeAssets && !isPlainObject(legacyNativeAssets)) {
logWarn(`${LOG_WARN_PREFIX}: Native assets object is empty or not an object: ${legacyNativeAssets}`);
isInvalidNativeRequest = true;
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
File priceFloors.js
has 593 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
debugTurnedOn,
deepAccess,
deepClone,
deepSetValue,
File prebid.js
has 591 lines of code (exceeds 250 allowed). Consider refactoring. Open
/** @module pbjs */
import {getGlobal} from './prebidGlobal.js';
import {
deepAccess,
Function buildRequests
has 252 lines of code (exceeds 25 allowed). Consider refactoring. Open
buildRequests(validBidRequests, bidderRequest) {
this.loadWhitelabelData(validBidRequests[0]);
this.propertyBag.buildRequestsStart = new Date().getTime();
let whitelabelBidder = this.propertyBag.whitelabel.bidder; // by default = ozone
let whitelabelPrefix = this.propertyBag.whitelabel.keyPrefix;
File adtrueBidAdapter.js
has 580 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { logWarn, isArray, inIframe, isNumber, isStr, deepClone, deepSetValue, logError, deepAccess, isBoolean } from '../src/utils.js';
import {registerBidder} from '../src/adapters/bidderFactory.js';
import {BANNER, NATIVE, VIDEO} from '../src/mediaTypes.js';
import {config} from '../src/config.js';
import {getStorageManager} from '../src/storageManager.js';
Function buildOneRequest
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
function buildOneRequest(validBidRequests, bidderRequest) {
let hostInfo = _getHostInfo(validBidRequests);
const ENDPOINT = hostInfo.endpoint;
hostDomain = hostInfo.domain;
- 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 storageTool
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
const storageTool = (function () {
const storage = getStorageManager({ bidderCode: BIDDER_CODE });
let metaInternal;
const getMetaDataFromLocalStorage = function (pNetwork) {
- 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"