prebid/Prebid.js

View on GitHub
modules/mgidXBidAdapter.js

Summary

Maintainability
F
1 wk
Test Coverage

Function getUserSyncs has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
Open

  getUserSyncs: (syncOptions, serverResponses, gdprConsent, uspConsent, gppConsent) => {
    const spb = isPlainObject(config.getConfig('userSync')) &&
    isNumber(config.getConfig('userSync').syncsPerBidder)
      ? config.getConfig('userSync').syncsPerBidder : USERSYNC_DEFAULT_CONFIG.syncsPerBidder;

Severity: Minor
Found in modules/mgidXBidAdapter.js - About 5 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 buildRequests has 60 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  buildRequests: (validBidRequests = [], bidderRequest = {}) => {
    // convert Native ORTB definition to old-style prebid native definition
    validBidRequests = convertOrtbRequestToProprietaryNative(validBidRequests);

    let deviceWidth = 0;
Severity: Major
Found in modules/mgidXBidAdapter.js - About 2 hrs to fix

    Function getUserSyncs has 57 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      getUserSyncs: (syncOptions, serverResponses, gdprConsent, uspConsent, gppConsent) => {
        const spb = isPlainObject(config.getConfig('userSync')) &&
        isNumber(config.getConfig('userSync').syncsPerBidder)
          ? config.getConfig('userSync').syncsPerBidder : USERSYNC_DEFAULT_CONFIG.syncsPerBidder;
    
    
    Severity: Major
    Found in modules/mgidXBidAdapter.js - About 2 hrs to fix

      Function getPlacementReqData has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function getPlacementReqData(bid) {
        const { params, bidId, mediaTypes } = bid;
        const schain = bid.schain || {};
        const { placementId, endpointId } = params;
        const bidfloor = getBidFloor(bid);
      Severity: Minor
      Found in modules/mgidXBidAdapter.js - About 1 hr to fix

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

          buildRequests: (validBidRequests = [], bidderRequest = {}) => {
            // convert Native ORTB definition to old-style prebid native definition
            validBidRequests = convertOrtbRequestToProprietaryNative(validBidRequests);
        
            let deviceWidth = 0;
        Severity: Minor
        Found in modules/mgidXBidAdapter.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 (serverResponses &&
                isArray(serverResponses) &&
                serverResponses.length > 0 &&
                isPlainObject(serverResponses[0].body) &&
                isPlainObject(serverResponses[0].body.ext) &&
        Severity: Major
        Found in modules/mgidXBidAdapter.js - About 1 hr to fix

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

          function getPlacementReqData(bid) {
            const { params, bidId, mediaTypes } = bid;
            const schain = bid.schain || {};
            const { placementId, endpointId } = params;
            const bidfloor = getBidFloor(bid);
          Severity: Minor
          Found in modules/mgidXBidAdapter.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

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

            interpretResponse: (serverResponse) => {
              let response = [];
              for (let i = 0; i < serverResponse.body.length; i++) {
                let resItem = serverResponse.body[i];
                if (isBidResponseValid(resItem)) {
          Severity: Minor
          Found in modules/mgidXBidAdapter.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

          Function isBidRequestValid has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

            isBidRequestValid: (bid = {}) => {
              const { params, bidId, mediaTypes } = bid;
              let valid = Boolean(bidId && params && (params.placementId || params.endpointId));
          
              if (mediaTypes && mediaTypes[BANNER]) {
          Severity: Minor
          Found in modules/mgidXBidAdapter.js - About 25 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 isBidResponseValid has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

          function isBidResponseValid(bid) {
            if (!bid.requestId || !bid.cpm || !bid.creativeId || !bid.ttl || !bid.currency) {
              return false;
            }
          
          
          Severity: Minor
          Found in modules/mgidXBidAdapter.js - About 25 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 10 locations. Consider refactoring.
          Open

          function getPlacementReqData(bid) {
            const { params, bidId, mediaTypes } = bid;
            const schain = bid.schain || {};
            const { placementId, endpointId } = params;
            const bidfloor = getBidFloor(bid);
          Severity: Major
          Found in modules/mgidXBidAdapter.js and 9 other locations - About 3 days to fix
          modules/appushBidAdapter.js on lines 28..74
          modules/compassBidAdapter.js on lines 29..75
          modules/edge226BidAdapter.js on lines 28..74
          modules/emtvBidAdapter.js on lines 29..75
          modules/globalsunBidAdapter.js on lines 29..75
          modules/iqzoneBidAdapter.js on lines 29..75
          modules/kiviadsBidAdapter.js on lines 29..75
          modules/playdigoBidAdapter.js on lines 27..73
          modules/visiblemeasuresBidAdapter.js on lines 29..75

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

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

          function isBidResponseValid(bid) {
            if (!bid.requestId || !bid.cpm || !bid.creativeId || !bid.ttl || !bid.currency) {
              return false;
            }
          
          
          Severity: Major
          Found in modules/mgidXBidAdapter.js and 15 other locations - About 7 hrs to fix
          modules/acuityadsBidAdapter.js on lines 12..27
          modules/appushBidAdapter.js on lines 11..26
          modules/axisBidAdapter.js on lines 12..27
          modules/beyondmediaBidAdapter.js on lines 11..26
          modules/compassBidAdapter.js on lines 12..27
          modules/edge226BidAdapter.js on lines 11..26
          modules/emtvBidAdapter.js on lines 12..27
          modules/globalsunBidAdapter.js on lines 12..27
          modules/iqzoneBidAdapter.js on lines 11..27
          modules/kiviadsBidAdapter.js on lines 12..27
          modules/loyalBidAdapter.js on lines 11..26
          modules/pgamsspBidAdapter.js on lines 12..27
          modules/playdigoBidAdapter.js on lines 10..25
          modules/pubCircleBidAdapter.js on lines 12..27
          modules/visiblemeasuresBidAdapter.js on lines 12..27

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

          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 (serverResponses &&
                  isArray(serverResponses) &&
                  serverResponses.length > 0 &&
                  isPlainObject(serverResponses[0].body) &&
                  isPlainObject(serverResponses[0].body.ext) &&
          Severity: Major
          Found in modules/mgidXBidAdapter.js and 1 other location - About 5 hrs to fix
          modules/mgidBidAdapter.js on lines 376..384

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

          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 (pixels.length === 0) {
                    for (let i = 0; i < spb; i++) {
                      syncs.push({
                        type: 'image',
                        url: PIXEL_SYNC_URL + '?' + q.replace('{cbuster}', Math.round(new Date().getTime())) // randomly selects partner if sync required
          Severity: Major
          Found in modules/mgidXBidAdapter.js and 1 other location - About 4 hrs to fix
          modules/mgidBidAdapter.js on lines 411..425

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

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

          function getBidFloor(bid) {
            if (!isFn(bid.getFloor)) {
              return deepAccess(bid, 'params.bidfloor', 0);
            }
          
          
          Severity: Major
          Found in modules/mgidXBidAdapter.js and 13 other locations - About 3 hrs to fix
          modules/acuityadsBidAdapter.js on lines 72..88
          modules/appushBidAdapter.js on lines 76..92
          modules/axisBidAdapter.js on lines 74..90
          modules/beyondmediaBidAdapter.js on lines 71..87
          modules/compassBidAdapter.js on lines 77..93
          modules/edge226BidAdapter.js on lines 76..92
          modules/emtvBidAdapter.js on lines 77..93
          modules/globalsunBidAdapter.js on lines 77..93
          modules/kiviadsBidAdapter.js on lines 77..93
          modules/pgamsspBidAdapter.js on lines 83..99
          modules/pubCircleBidAdapter.js on lines 79..95
          modules/smarthubBidAdapter.js on lines 71..87
          modules/visiblemeasuresBidAdapter.js on lines 77..93

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

          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

              const request = {
                deviceWidth,
                deviceHeight,
                language,
                secure,
          Severity: Major
          Found in modules/mgidXBidAdapter.js and 1 other location - About 2 hrs to fix
          modules/loyalBidAdapter.js on lines 143..154

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

          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

              const spb = isPlainObject(config.getConfig('userSync')) &&
              isNumber(config.getConfig('userSync').syncsPerBidder)
                ? config.getConfig('userSync').syncsPerBidder : USERSYNC_DEFAULT_CONFIG.syncsPerBidder;
          Severity: Major
          Found in modules/mgidXBidAdapter.js and 1 other location - About 1 hr to fix
          modules/mgidBidAdapter.js on lines 370..372

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

          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 (isPlainObject(gdprConsent) && typeof gdprConsent?.gdprApplies === 'boolean' && gdprConsent.gdprApplies) {
                  query.push('gdpr=1');
                } else {
                  query.push('gdpr=0');
                }
          Severity: Major
          Found in modules/mgidXBidAdapter.js and 1 other location - About 1 hr to fix
          modules/mgidBidAdapter.js on lines 390..394

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

                if (isPlainObject(gppConsent) && gppConsent?.gppString) {
                  query.push(`gppString=${encodeURIComponent(gppConsent?.gppString)}`);
                }
          Severity: Major
          Found in modules/mgidXBidAdapter.js and 3 other locations - About 35 mins to fix
          modules/mgidBidAdapter.js on lines 395..397
          modules/mgidBidAdapter.js on lines 398..400
          modules/mgidXBidAdapter.js on lines 240..242

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

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

                if (isPlainObject(uspConsent) && uspConsent?.consentString) {
                  query.push(`us_privacy=${encodeURIComponent(uspConsent?.consentString)}`);
                }
          Severity: Major
          Found in modules/mgidXBidAdapter.js and 3 other locations - About 35 mins to fix
          modules/mgidBidAdapter.js on lines 395..397
          modules/mgidBidAdapter.js on lines 398..400
          modules/mgidXBidAdapter.js on lines 243..245

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

          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

                query.push('gdpr_consent=' + encodeURIComponent(isPlainObject(gdprConsent) && isStr(gdprConsent?.consentString) ? gdprConsent.consentString : ''));
          Severity: Minor
          Found in modules/mgidXBidAdapter.js and 1 other location - About 30 mins to fix
          modules/mgidBidAdapter.js on lines 389..389

          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