prebid/Prebid.js

View on GitHub
modules/vidazooBidAdapter.js

Summary

Maintainability
F
1 wk
Test Coverage

File vidazooBidAdapter.js has 439 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import {
  _each,
  deepAccess,
  isFn,
  parseSizesInput,
Severity: Minor
Found in modules/vidazooBidAdapter.js - About 6 hrs to fix

    Function buildRequestData has 103 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function buildRequestData(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
      const {
        params,
        bidId,
        userId,
    Severity: Major
    Found in modules/vidazooBidAdapter.js - About 4 hrs to fix

      Function interpretResponse has 66 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function interpretResponse(serverResponse, request) {
        if (!serverResponse || !serverResponse.body) {
          return [];
        }
      
      
      Severity: Major
      Found in modules/vidazooBidAdapter.js - About 2 hrs to fix

        Function buildRequestData has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
        Open

        function buildRequestData(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
          const {
            params,
            bidId,
            userId,
        Severity: Minor
        Found in modules/vidazooBidAdapter.js - About 2 hrs 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 buildRequest has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
        Severity: Minor
        Found in modules/vidazooBidAdapter.js - About 35 mins to fix

          Function getUserSyncs has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          function getUserSyncs(syncOptions, responses, gdprConsent = {}, uspConsent = '', gppConsent = {}) {
          Severity: Minor
          Found in modules/vidazooBidAdapter.js - About 35 mins to fix

            Function buildRequestData has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            function buildRequestData(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
            Severity: Minor
            Found in modules/vidazooBidAdapter.js - About 35 mins to fix

              Function buildRequests has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              function buildRequests(validBidRequests, bidderRequest) {
                // TODO: does the fallback make sense here?
                const topWindowUrl = bidderRequest.refererInfo.page || bidderRequest.refererInfo.topmostLocation;
                const bidderTimeout = config.getConfig('bidderTimeout');
              
              
              Severity: Minor
              Found in modules/vidazooBidAdapter.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

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

              function interpretResponse(serverResponse, request) {
                if (!serverResponse || !serverResponse.body) {
                  return [];
                }
              
              
              Severity: Major
              Found in modules/vidazooBidAdapter.js and 1 other location - About 2 days to fix
              modules/twistDigitalBidAdapter.js on lines 264..339

              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 421.

              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

              function getUserSyncs(syncOptions, responses, gdprConsent = {}, uspConsent = '', gppConsent = {}) {
                let syncs = [];
                const {iframeEnabled, pixelEnabled} = syncOptions;
                const {gdprApplies, consentString = ''} = gdprConsent;
                const {gppString, applicableSections} = gppConsent;
              Severity: Major
              Found in modules/vidazooBidAdapter.js and 1 other location - About 1 day to fix
              modules/twistDigitalBidAdapter.js on lines 341..368

              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 341.

              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

                if (singleRequestMode) {
                  // banner bids are sent as a single request
                  const bannerBidRequests = validBidRequests.filter(bid => isArray(bid.mediaTypes) ? bid.mediaTypes.includes(BANNER) : bid.mediaTypes[BANNER] !== undefined);
                  if (bannerBidRequests.length > 0) {
                    const singleRequests = buildSingleRequest(bannerBidRequests, bidderRequest, topWindowUrl, bidderTimeout);
              Severity: Major
              Found in modules/vidazooBidAdapter.js and 1 other location - About 1 day to fix
              modules/twistDigitalBidAdapter.js on lines 238..260

              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 263.

              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

              function onBidWon(bid) {
                if (!bid.nurl) {
                  return;
                }
                const wonBid = {
              Severity: Major
              Found in modules/vidazooBidAdapter.js and 1 other location - About 1 day to fix
              modules/twistDigitalBidAdapter.js on lines 373..395

              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 211.

              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

              function buildSingleRequest(bidRequests, bidderRequest, topWindowUrl, bidderTimeout) {
                const {params} = bidRequests[0];
                const cId = extractCID(params);
                const subDomain = extractSubDomain(params);
                const data = bidRequests.map(bid => {
              Severity: Major
              Found in modules/vidazooBidAdapter.js and 1 other location - About 1 day to fix
              modules/twistDigitalBidAdapter.js on lines 185..205

              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 197.

              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 7 locations. Consider refactoring.
              Open

              export function getUniqueDealId(key, expiry = UNIQUE_DEAL_ID_EXPIRY) {
                const storageKey = `u_${key}`;
                const now = Date.now();
                const data = getStorageItem(storageKey);
                let uniqueId;
              Severity: Major
              Found in modules/vidazooBidAdapter.js and 6 other locations - About 5 hrs to fix
              modules/illuminBidAdapter.js on lines 285..299
              modules/kueezRtbBidAdapter.js on lines 295..309
              modules/minutemediaplusBidAdapter.js on lines 296..310
              modules/shinezRtbBidAdapter.js on lines 284..298
              modules/tagorasBidAdapter.js on lines 290..304
              modules/twistDigitalBidAdapter.js on lines 409..423

              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 151.

              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 7 locations. Consider refactoring.
              Open

              function appendUserIdsToRequestPayload(payloadRef, userIds) {
                let key;
                _each(userIds, (userId, idSystemProviderName) => {
                  key = `uid.${idSystemProviderName}`;
                  switch (idSystemProviderName) {
              Severity: Major
              Found in modules/vidazooBidAdapter.js and 6 other locations - About 5 hrs to fix
              modules/illuminBidAdapter.js on lines 147..169
              modules/kueezRtbBidAdapter.js on lines 150..172
              modules/minutemediaplusBidAdapter.js on lines 151..173
              modules/shinezRtbBidAdapter.js on lines 146..168
              modules/tagorasBidAdapter.js on lines 146..168
              modules/twistDigitalBidAdapter.js on lines 207..228

              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 144.

              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

              function buildRequest(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout) {
                const {params} = bid;
                const cId = extractCID(params);
                const subDomain = extractSubDomain(params);
                const data = buildRequestData(bid, topWindowUrl, sizes, bidderRequest, bidderTimeout);
              Severity: Major
              Found in modules/vidazooBidAdapter.js and 1 other location - About 3 hrs to fix
              modules/twistDigitalBidAdapter.js on lines 172..183

              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 106.

              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 7 locations. Consider refactoring.
              Open

              export function hashCode(s, prefix = '_') {
                const l = s.length;
                let h = 0
                let i = 0;
                if (l > 0) {
              Severity: Major
              Found in modules/vidazooBidAdapter.js and 6 other locations - About 3 hrs to fix
              modules/illuminBidAdapter.js on lines 273..283
              modules/kueezRtbBidAdapter.js on lines 283..293
              modules/minutemediaplusBidAdapter.js on lines 284..294
              modules/shinezRtbBidAdapter.js on lines 272..282
              modules/tagorasBidAdapter.js on lines 278..288
              modules/twistDigitalBidAdapter.js on lines 397..407

              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 104.

              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 7 locations. Consider refactoring.
              Open

              export function setStorageItem(key, value, timestamp) {
                try {
                  const created = timestamp || Date.now();
                  const data = JSON.stringify({value, created});
                  storage.setDataInLocalStorage(key, data);
              Severity: Major
              Found in modules/vidazooBidAdapter.js and 6 other locations - About 2 hrs to fix
              modules/illuminBidAdapter.js on lines 310..317
              modules/kueezRtbBidAdapter.js on lines 320..327
              modules/minutemediaplusBidAdapter.js on lines 321..328
              modules/shinezRtbBidAdapter.js on lines 309..316
              modules/tagorasBidAdapter.js on lines 315..322
              modules/twistDigitalBidAdapter.js on lines 434..441

              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 84.

              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 12 locations. Consider refactoring.
              Open

              export function extractCID(params) {
                return params.cId || params.CID || params.cID || params.CId || params.cid || params.ciD || params.Cid || params.CiD;
              }
              Severity: Major
              Found in modules/vidazooBidAdapter.js and 11 other locations - About 2 hrs to fix
              modules/kueezRtbBidAdapter.js on lines 29..31
              modules/kueezRtbBidAdapter.js on lines 33..35
              modules/minutemediaplusBidAdapter.js on lines 30..32
              modules/minutemediaplusBidAdapter.js on lines 34..36
              modules/shinezRtbBidAdapter.js on lines 28..30
              modules/shinezRtbBidAdapter.js on lines 32..34
              modules/tagorasBidAdapter.js on lines 28..30
              modules/tagorasBidAdapter.js on lines 32..34
              modules/twistDigitalBidAdapter.js on lines 43..45
              modules/twistDigitalBidAdapter.js on lines 47..49
              modules/vidazooBidAdapter.js on lines 49..51

              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 75.

              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 12 locations. Consider refactoring.
              Open

              export function extractPID(params) {
                return params.pId || params.PID || params.pID || params.PId || params.pid || params.piD || params.Pid || params.PiD;
              }
              Severity: Major
              Found in modules/vidazooBidAdapter.js and 11 other locations - About 2 hrs to fix
              modules/kueezRtbBidAdapter.js on lines 29..31
              modules/kueezRtbBidAdapter.js on lines 33..35
              modules/minutemediaplusBidAdapter.js on lines 30..32
              modules/minutemediaplusBidAdapter.js on lines 34..36
              modules/shinezRtbBidAdapter.js on lines 28..30
              modules/shinezRtbBidAdapter.js on lines 32..34
              modules/tagorasBidAdapter.js on lines 28..30
              modules/tagorasBidAdapter.js on lines 32..34
              modules/twistDigitalBidAdapter.js on lines 43..45
              modules/twistDigitalBidAdapter.js on lines 47..49
              modules/vidazooBidAdapter.js on lines 45..47

              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 75.

              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 7 locations. Consider refactoring.
              Open

              function getTopWindowQueryParams() {
                try {
                  const parsedUrl = parseUrl(window.top.document.URL, {decodeSearchAsString: true});
                  return parsedUrl.search;
                } catch (e) {
              Severity: Major
              Found in modules/vidazooBidAdapter.js and 6 other locations - About 1 hr to fix
              modules/illuminBidAdapter.js on lines 16..23
              modules/kueezRtbBidAdapter.js on lines 16..23
              modules/minutemediaplusBidAdapter.js on lines 17..24
              modules/shinezRtbBidAdapter.js on lines 15..22
              modules/tagorasBidAdapter.js on lines 15..22
              modules/twistDigitalBidAdapter.js on lines 30..37

              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 62.

              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 6 locations. Consider refactoring.
              Open

              export function extractSubDomain(params) {
                return params.subDomain || params.SubDomain || params.Subdomain || params.subdomain || params.SUBDOMAIN || params.subDOMAIN;
              }
              Severity: Major
              Found in modules/vidazooBidAdapter.js and 5 other locations - About 1 hr to fix
              modules/kueezRtbBidAdapter.js on lines 37..39
              modules/minutemediaplusBidAdapter.js on lines 38..40
              modules/shinezRtbBidAdapter.js on lines 36..38
              modules/tagorasBidAdapter.js on lines 36..38
              modules/twistDigitalBidAdapter.js on lines 51..53

              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 59.

              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 3 locations. Consider refactoring.
              Open

              export const spec = {
                code: BIDDER_CODE,
                version: BIDDER_VERSION,
                gvlid: GVLID,
                supportedMediaTypes: [BANNER, VIDEO],
              Severity: Major
              Found in modules/vidazooBidAdapter.js and 2 other locations - About 1 hr to fix
              modules/33acrossBidAdapter.js on lines 835..846
              modules/twistDigitalBidAdapter.js on lines 451..461

              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 59.

              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