prebid/Prebid.js

View on GitHub
modules/deepintentBidAdapter.js

Summary

Maintainability
F
5 days
Test Coverage

ORTB_VIDEO_PARAMS has 23 functions (exceeds 20 allowed). Consider refactoring.
Open

export const ORTB_VIDEO_PARAMS = {
  'mimes': (value) => Array.isArray(value) && value.length > 0 && value.every(v => typeof v === 'string'),
  'minduration': (value) => isInteger(value),
  'maxduration': (value) => isInteger(value),
  'protocols': (value) => Array.isArray(value) && value.every(v => v >= 1 && v <= 10),
Severity: Minor
Found in modules/deepintentBidAdapter.js - About 2 hrs to fix

    File deepintentBidAdapter.js has 269 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { generateUUID, deepSetValue, deepAccess, isArray, isInteger, logError, logWarn } from '../src/utils.js';
    import {registerBidder} from '../src/adapters/bidderFactory.js';
    import {BANNER, VIDEO} from '../src/mediaTypes.js';
    const BIDDER_CODE = 'deepintent';
    const GVL_ID = 541;
    Severity: Minor
    Found in modules/deepintentBidAdapter.js - About 2 hrs to fix

      Function buildBanner has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

      function buildBanner(bid) {
        if (deepAccess(bid, 'mediaTypes.banner')) {
          // Get Sizes from MediaTypes Object, Will always take first size, will be overrided by params for exact w,h
          if (deepAccess(bid, 'mediaTypes.banner.sizes') && !bid.params.height && !bid.params.width) {
            let sizes = deepAccess(bid, 'mediaTypes.banner.sizes');
      Severity: Minor
      Found in modules/deepintentBidAdapter.js - About 1 hr to fix

      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

      Consider simplifying this complex logical expression.
      Open

        if (bid && bid.params && bid.params.user) {
          return {
            id: bid.params.user.id && typeof bid.params.user.id == 'string' ? bid.params.user.id : undefined,
            buyeruid: bid.params.user.buyeruid && typeof bid.params.user.buyeruid == 'string' ? bid.params.user.buyeruid : undefined,
            yob: bid.params.user.yob && typeof bid.params.user.yob == 'number' ? bid.params.user.yob : null,
      Severity: Critical
      Found in modules/deepintentBidAdapter.js - About 1 hr to fix

        Function buildUser has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

        function buildUser(bid) {
          if (bid && bid.params && bid.params.user) {
            return {
              id: bid.params.user.id && typeof bid.params.user.id == 'string' ? bid.params.user.id : undefined,
              buyeruid: bid.params.user.buyeruid && typeof bid.params.user.buyeruid == 'string' ? bid.params.user.buyeruid : undefined,
        Severity: Minor
        Found in modules/deepintentBidAdapter.js - About 1 hr to fix

        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 isBidRequestValid has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

          isBidRequestValid: bid => {
            let valid = false;
            if (bid && bid.params && bid.params.tagId) {
              if (typeof bid.params.tagId === 'string' || bid.params.tagId instanceof String) {
                if (bid.hasOwnProperty('mediaTypes') && bid.mediaTypes.hasOwnProperty(VIDEO)) {
        Severity: Minor
        Found in modules/deepintentBidAdapter.js - About 1 hr to fix

        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 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          buildRequests: function (validBidRequests, bidderRequest) {
            var user = validBidRequests.map(bid => buildUser(bid));
            clean(user);
            const openRtbBidRequest = {
              id: generateUUID(),
        Severity: Minor
        Found in modules/deepintentBidAdapter.js - About 1 hr to fix

          Function formatResponse has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
          Open

          function formatResponse(bid) {
            return {
              requestId: bid && bid.impid ? bid.impid : undefined,
              cpm: bid && bid.price ? bid.price : 0.0,
              width: bid && bid.w ? bid.w : 0,
          Severity: Minor
          Found in modules/deepintentBidAdapter.js - About 1 hr to fix

          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 8 (exceeds 5 allowed). Consider refactoring.
          Open

            buildRequests: function (validBidRequests, bidderRequest) {
              var user = validBidRequests.map(bid => buildUser(bid));
              clean(user);
              const openRtbBidRequest = {
                id: generateUUID(),
          Severity: Minor
          Found in modules/deepintentBidAdapter.js - About 45 mins to fix

          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 interpretResponse has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

            interpretResponse: function(bidResponse, bidRequest) {
              let responses = [];
              if (bidResponse && bidResponse.body) {
                try {
                  let bids = bidResponse.body.seatbid && bidResponse.body.seatbid[0] ? bidResponse.body.seatbid[0].bid : [];
          Severity: Minor
          Found in modules/deepintentBidAdapter.js - About 35 mins to fix

          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

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

          function formatResponse(bid) {
            return {
              requestId: bid && bid.impid ? bid.impid : undefined,
              cpm: bid && bid.price ? bid.price : 0.0,
              width: bid && bid.w ? bid.w : 0,
          Severity: Major
          Found in modules/deepintentBidAdapter.js and 1 other location - About 1 day to fix
          modules/relevatehealthBidAdapter.js on lines 123..139

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 232.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

              if (bidderRequest?.gppConsent?.gppString) {
                deepSetValue(openRtbBidRequest, 'regs.gpp', bidderRequest.gppConsent.gppString);
                deepSetValue(openRtbBidRequest, 'regs.gpp_sid', bidderRequest.gppConsent.applicableSections);
              } else if (bidderRequest?.ortb2?.regs?.gpp) {
                deepSetValue(openRtbBidRequest, 'regs.gpp', bidderRequest.ortb2.regs.gpp);
          Severity: Major
          Found in modules/deepintentBidAdapter.js and 1 other location - About 4 hrs to fix
          modules/pubmaticBidAdapter.js on lines 1230..1236

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 115.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

            Object.keys(ORTB_VIDEO_PARAMS).forEach(paramName => {
              if (videoParams.hasOwnProperty(paramName)) {
                if (ORTB_VIDEO_PARAMS[paramName](videoParams[paramName])) {
                  videoObj[paramName] = videoParams[paramName];
                } else {
          Severity: Major
          Found in modules/deepintentBidAdapter.js and 1 other location - About 2 hrs to fix
          modules/sovrnBidAdapter.js on lines 367..375

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 94.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

            if (Array.isArray(videoAdUnitParams.playerSize)) {
              const tempSize = (Array.isArray(videoAdUnitParams.playerSize[0])) ? videoAdUnitParams.playerSize[0] : videoAdUnitParams.playerSize;
              computedParams.w = tempSize[0];
              computedParams.h = tempSize[1];
            }
          Severity: Major
          Found in modules/deepintentBidAdapter.js and 1 other location - About 2 hrs to fix
          modules/sovrnBidAdapter.js on lines 355..359

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 90.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 5 locations. Consider refactoring.
          Open

                id: bid.params.user.id && typeof bid.params.user.id == 'string' ? bid.params.user.id : undefined,
          Severity: Major
          Found in modules/deepintentBidAdapter.js and 4 other locations - About 1 hr to fix
          modules/deepintentBidAdapter.js on lines 240..240
          modules/deepintentBidAdapter.js on lines 242..242
          modules/deepintentBidAdapter.js on lines 243..243
          modules/deepintentBidAdapter.js on lines 244..244

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 57.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 5 locations. Consider refactoring.
          Open

                buyeruid: bid.params.user.buyeruid && typeof bid.params.user.buyeruid == 'string' ? bid.params.user.buyeruid : undefined,
          Severity: Major
          Found in modules/deepintentBidAdapter.js and 4 other locations - About 1 hr to fix
          modules/deepintentBidAdapter.js on lines 239..239
          modules/deepintentBidAdapter.js on lines 242..242
          modules/deepintentBidAdapter.js on lines 243..243
          modules/deepintentBidAdapter.js on lines 244..244

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 57.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 5 locations. Consider refactoring.
          Open

                gender: bid.params.user.gender && typeof bid.params.user.gender == 'string' ? bid.params.user.gender : undefined,
          Severity: Major
          Found in modules/deepintentBidAdapter.js and 4 other locations - About 1 hr to fix
          modules/deepintentBidAdapter.js on lines 239..239
          modules/deepintentBidAdapter.js on lines 240..240
          modules/deepintentBidAdapter.js on lines 243..243
          modules/deepintentBidAdapter.js on lines 244..244

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 57.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 5 locations. Consider refactoring.
          Open

                customdata: bid.params.user.customdata && typeof bid.params.user.customdata == 'string' ? bid.params.user.customdata : undefined
          Severity: Major
          Found in modules/deepintentBidAdapter.js and 4 other locations - About 1 hr to fix
          modules/deepintentBidAdapter.js on lines 239..239
          modules/deepintentBidAdapter.js on lines 240..240
          modules/deepintentBidAdapter.js on lines 242..242
          modules/deepintentBidAdapter.js on lines 243..243

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 57.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 5 locations. Consider refactoring.
          Open

                keywords: bid.params.user.keywords && typeof bid.params.user.keywords == 'string' ? bid.params.user.keywords : undefined,
          Severity: Major
          Found in modules/deepintentBidAdapter.js and 4 other locations - About 1 hr to fix
          modules/deepintentBidAdapter.js on lines 239..239
          modules/deepintentBidAdapter.js on lines 240..240
          modules/deepintentBidAdapter.js on lines 242..242
          modules/deepintentBidAdapter.js on lines 244..244

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 57.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

                  let bids = bidResponse.body.seatbid && bidResponse.body.seatbid[0] ? bidResponse.body.seatbid[0].bid : [];
          Severity: Minor
          Found in modules/deepintentBidAdapter.js and 1 other location - About 55 mins to fix
          modules/relevatehealthBidAdapter.js on lines 66..66

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 54.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 3 locations. Consider refactoring.
          Open

            'mimes': (value) => Array.isArray(value) && value.length > 0 && value.every(v => typeof v === 'string'),
          Severity: Major
          Found in modules/deepintentBidAdapter.js and 2 other locations - About 50 mins to fix
          modules/adagioBidAdapter.js on lines 47..47
          modules/sovrnBidAdapter.js on lines 23..23

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 51.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 10 locations. Consider refactoring.
          Open

            'api': (value) => Array.isArray(value) && value.every(v => v >= 1 && v <= 6)
          Severity: Major
          Found in modules/deepintentBidAdapter.js and 9 other locations - About 30 mins to fix
          modules/deepintentBidAdapter.js on lines 13..13
          modules/deepintentBidAdapter.js on lines 17..17
          modules/deepintentBidAdapter.js on lines 23..23
          modules/deepintentBidAdapter.js on lines 28..28
          modules/sovrnBidAdapter.js on lines 26..26
          modules/sovrnBidAdapter.js on lines 37..37
          modules/sovrnBidAdapter.js on lines 42..42
          modules/sovrnBidAdapter.js on lines 44..44
          modules/sovrnBidAdapter.js on lines 46..46

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 45.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 10 locations. Consider refactoring.
          Open

            'battr': (value) => Array.isArray(value) && value.every(v => v >= 1 && v <= 17),
          Severity: Major
          Found in modules/deepintentBidAdapter.js and 9 other locations - About 30 mins to fix
          modules/deepintentBidAdapter.js on lines 13..13
          modules/deepintentBidAdapter.js on lines 17..17
          modules/deepintentBidAdapter.js on lines 28..28
          modules/deepintentBidAdapter.js on lines 32..32
          modules/sovrnBidAdapter.js on lines 26..26
          modules/sovrnBidAdapter.js on lines 37..37
          modules/sovrnBidAdapter.js on lines 42..42
          modules/sovrnBidAdapter.js on lines 44..44
          modules/sovrnBidAdapter.js on lines 46..46

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 45.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 10 locations. Consider refactoring.
          Open

            'plcmt': (value) => Array.isArray(value) && value.every(v => v >= 1 && v <= 5),
          Severity: Major
          Found in modules/deepintentBidAdapter.js and 9 other locations - About 30 mins to fix
          modules/deepintentBidAdapter.js on lines 13..13
          modules/deepintentBidAdapter.js on lines 23..23
          modules/deepintentBidAdapter.js on lines 28..28
          modules/deepintentBidAdapter.js on lines 32..32
          modules/sovrnBidAdapter.js on lines 26..26
          modules/sovrnBidAdapter.js on lines 37..37
          modules/sovrnBidAdapter.js on lines 42..42
          modules/sovrnBidAdapter.js on lines 44..44
          modules/sovrnBidAdapter.js on lines 46..46

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 45.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 10 locations. Consider refactoring.
          Open

            'protocols': (value) => Array.isArray(value) && value.every(v => v >= 1 && v <= 10),
          Severity: Major
          Found in modules/deepintentBidAdapter.js and 9 other locations - About 30 mins to fix
          modules/deepintentBidAdapter.js on lines 17..17
          modules/deepintentBidAdapter.js on lines 23..23
          modules/deepintentBidAdapter.js on lines 28..28
          modules/deepintentBidAdapter.js on lines 32..32
          modules/sovrnBidAdapter.js on lines 26..26
          modules/sovrnBidAdapter.js on lines 37..37
          modules/sovrnBidAdapter.js on lines 42..42
          modules/sovrnBidAdapter.js on lines 44..44
          modules/sovrnBidAdapter.js on lines 46..46

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 45.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 10 locations. Consider refactoring.
          Open

            'playbackmethod': (value) => Array.isArray(value) && value.every(v => v >= 1 && v <= 6),
          Severity: Major
          Found in modules/deepintentBidAdapter.js and 9 other locations - About 30 mins to fix
          modules/deepintentBidAdapter.js on lines 13..13
          modules/deepintentBidAdapter.js on lines 17..17
          modules/deepintentBidAdapter.js on lines 23..23
          modules/deepintentBidAdapter.js on lines 32..32
          modules/sovrnBidAdapter.js on lines 26..26
          modules/sovrnBidAdapter.js on lines 37..37
          modules/sovrnBidAdapter.js on lines 42..42
          modules/sovrnBidAdapter.js on lines 44..44
          modules/sovrnBidAdapter.js on lines 46..46

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 45.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          There are no issues that match your filters.

          Category
          Status