Showing 3,230 of 5,407 total issues
Function setMockCategories
has 1249 lines of code (exceeds 25 allowed). Consider refactoring. Open
prebidTestUtils.setMockCategories = function () {
const key = 'iabToFwMappingkey';
const keyPub = 'iabToFwMappingkeyPub';
const keyBidder = 'appnexus';
const currTime = new Date().getTime();
File ixBidAdapter.js
has 1580 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
contains,
deepAccess,
deepClone,
deepSetValue,
File longformTestUtils.js
has 1313 lines of code (exceeds 250 allowed). Consider refactoring. Open
var prebidTestUtils = prebidTestUtils || {};
function getIndustry(id) {
var mapping = window.localStorage.getItem('iabToFwMappingkey');
if (mapping) {
File pubmaticBidAdapter.js
has 1175 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { getBidRequest, logWarn, isBoolean, isStr, isArray, inIframe, mergeDeep, deepAccess, isNumber, deepSetValue, logInfo, logError, deepClone, uniques, isPlainObject, isInteger, generateUUID } from '../src/utils.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER, VIDEO, NATIVE, ADPOD } from '../src/mediaTypes.js';
import { config } from '../src/config.js';
import { Renderer } from '../src/Renderer.js';
Function nobidBuildRequests
has a Cognitive Complexity of 144 (exceeds 5 allowed). Consider refactoring. Open
function nobidBuildRequests(bids, bidderRequest) {
var serializeState = function(divIds, siteId, adunits) {
var filterAdUnitsByIds = function(divIds, adUnits) {
var filtered = [];
if (!divIds.length) {
- 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 appnexusBidAdapter.js
has 1067 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
createTrackPixelHtml,
deepAccess,
deepClone,
getBidRequest,
Function MarsmediaAdapter
has a Cognitive Complexity of 131 (exceeds 5 allowed). Consider refactoring. Open
function MarsmediaAdapter() {
this.code = 'marsmedia';
this.aliases = ['mars'];
this.supportedMediaTypes = [VIDEO, BANNER];
- 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 ozoneBidAdapter.js
has 1046 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
logInfo,
logError,
deepAccess,
logWarn,
File rubiconBidAdapter.js
has 1027 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { ortbConverter } from '../libraries/ortbConverter/converter.js';
import { pbsExtensions } from '../libraries/pbsExtensions/pbsExtensions.js';
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { config } from '../src/config.js';
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
File adagioBidAdapter.js
has 1001 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {find} from '../src/polyfill.js';
import {
cleanObj,
deepAccess,
deepClone,
Function _createNativeRequest
has a Cognitive Complexity of 117 (exceeds 5 allowed). Consider refactoring. Open
function _createNativeRequest(params) {
var nativeRequestObject = {
assets: []
};
for (var key in params) {
- 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 goldbachBidAdapter.js
has 924 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {Renderer} from '../src/Renderer.js';
import {
createTrackPixelHtml,
deepAccess,
deepClone,
File mediafuseBidAdapter.js
has 910 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
createTrackPixelHtml,
deepAccess,
deepClone,
getBidRequest,
Function buildRequests
has a Cognitive Complexity of 106 (exceeds 5 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;
- 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 createNativeRequest
has a Cognitive Complexity of 105 (exceeds 5 allowed). Consider refactoring. Open
function createNativeRequest(params) {
let nativeRequestObject = {
plcmtcnt: 1,
assets: []
};
- 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 magniteAnalyticsAdapter.js
has 867 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
debugTurnedOn,
deepAccess,
deepClone,
deepSetValue,
Function JWPlayerProvider
has 413 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function JWPlayerProvider(config, jwplayer_, adState_, timeState_, callbackStorage_, utils, sharedUtils) {
const jwplayer = jwplayer_;
let player = null;
let playerVersion = null;
const playerConfig = config.playerConfig;
Function VideojsProvider
has 404 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function VideojsProvider(providerConfig, vjs_, adState_, timeState_, callbackStorage_, utils) {
let vjs = vjs_;
// Supplied callbacks are typically wrapped by handlers
// we use this dict to keep track of these pairings
const callbackToHandler = {};
File pubwiseBidAdapter.js
has 836 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { _each, isBoolean, isEmptyStr, isNumber, isStr, deepClone, isArray, deepSetValue, inIframe, mergeDeep, deepAccess, logMessage, logInfo, logWarn, logError } 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';
Function newTargeting
has 401 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function newTargeting(auctionManager) {
let targeting = {};
let latestAuctionForAdUnit = {};
targeting.setLatestAuctionForAdUnit = function(adUnitCode, auctionId) {