prebid/Prebid.js

View on GitHub

Showing 4,826 of 4,826 total issues

Avoid too many return statements within this function.
Open

    return;
Severity: Major
Found in modules/adlooxAnalyticsAdapter.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        return;
    Severity: Major
    Found in modules/adlooxAnalyticsAdapter.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          return;
      Severity: Major
      Found in modules/adlooxAnalyticsAdapter.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            return false;
        Severity: Major
        Found in modules/nexx360BidAdapter.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

            if (!bid.adm) return false;
          Severity: Major
          Found in modules/ventesBidAdapter.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

              return true;
            Severity: Major
            Found in modules/nexx360BidAdapter.js - About 30 mins to fix

              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/sovrnBidAdapter.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/deepintentBidAdapter.js on lines 32..32
              modules/sovrnBidAdapter.js on lines 40..40
              modules/sovrnBidAdapter.js on lines 45..45
              modules/sovrnBidAdapter.js on lines 47..47
              modules/sovrnBidAdapter.js on lines 49..49

              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/sovrnBidAdapter.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/deepintentBidAdapter.js on lines 32..32
              modules/sovrnBidAdapter.js on lines 29..29
              modules/sovrnBidAdapter.js on lines 45..45
              modules/sovrnBidAdapter.js on lines 47..47
              modules/sovrnBidAdapter.js on lines 49..49

              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 29..29
              modules/sovrnBidAdapter.js on lines 40..40
              modules/sovrnBidAdapter.js on lines 45..45
              modules/sovrnBidAdapter.js on lines 47..47
              modules/sovrnBidAdapter.js on lines 49..49

              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

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

              export const parseBidderCode = function (bid) {
                let bidderCode = bid.bidderCode || bid.bidder;
                return bidderCode.toLowerCase();
              };
              Severity: Minor
              Found in modules/ucfunnelAnalyticsAdapter.js and 2 other locations - About 30 mins to fix
              modules/appierAnalyticsAdapter.js on lines 37..40
              modules/malltvAnalyticsAdapter.js on lines 34..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 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

                '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 29..29
              modules/sovrnBidAdapter.js on lines 40..40
              modules/sovrnBidAdapter.js on lines 45..45
              modules/sovrnBidAdapter.js on lines 47..47
              modules/sovrnBidAdapter.js on lines 49..49

              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

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

              export const parseBidderCode = function (bid) {
                let bidderCode = bid.bidderCode || bid.bidder
                return bidderCode.toLowerCase()
              }
              Severity: Minor
              Found in modules/malltvAnalyticsAdapter.js and 2 other locations - About 30 mins to fix
              modules/appierAnalyticsAdapter.js on lines 37..40
              modules/ucfunnelAnalyticsAdapter.js on lines 29..32

              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 29..29
              modules/sovrnBidAdapter.js on lines 40..40
              modules/sovrnBidAdapter.js on lines 45..45
              modules/sovrnBidAdapter.js on lines 47..47
              modules/sovrnBidAdapter.js on lines 49..49

              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 29..29
              modules/sovrnBidAdapter.js on lines 40..40
              modules/sovrnBidAdapter.js on lines 45..45
              modules/sovrnBidAdapter.js on lines 47..47
              modules/sovrnBidAdapter.js on lines 49..49

              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

                'delivery': (value) => Array.isArray(value) && value.every(v => v >= 1 && v <= 3),
              Severity: Major
              Found in modules/sovrnBidAdapter.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/deepintentBidAdapter.js on lines 32..32
              modules/sovrnBidAdapter.js on lines 29..29
              modules/sovrnBidAdapter.js on lines 40..40
              modules/sovrnBidAdapter.js on lines 45..45
              modules/sovrnBidAdapter.js on lines 49..49

              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

                'api': (value) => Array.isArray(value) && value.every(v => v >= 1 && v <= 6)
              Severity: Major
              Found in modules/sovrnBidAdapter.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/deepintentBidAdapter.js on lines 32..32
              modules/sovrnBidAdapter.js on lines 29..29
              modules/sovrnBidAdapter.js on lines 40..40
              modules/sovrnBidAdapter.js on lines 45..45
              modules/sovrnBidAdapter.js on lines 47..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 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 29..29
              modules/sovrnBidAdapter.js on lines 40..40
              modules/sovrnBidAdapter.js on lines 45..45
              modules/sovrnBidAdapter.js on lines 47..47
              modules/sovrnBidAdapter.js on lines 49..49

              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/sovrnBidAdapter.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/deepintentBidAdapter.js on lines 32..32
              modules/sovrnBidAdapter.js on lines 29..29
              modules/sovrnBidAdapter.js on lines 40..40
              modules/sovrnBidAdapter.js on lines 47..47
              modules/sovrnBidAdapter.js on lines 49..49

              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

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

              export const parseBidderCode = function (bid) {
                let bidderCode = bid.bidderCode || bid.bidder;
                return bidderCode.toLowerCase();
              };
              Severity: Minor
              Found in modules/appierAnalyticsAdapter.js and 2 other locations - About 30 mins to fix
              modules/malltvAnalyticsAdapter.js on lines 34..37
              modules/ucfunnelAnalyticsAdapter.js on lines 29..32

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

                        assetObj.h = assetObj.h || assetObj.height || (assetObj.sizes ? assetObj.sizes[1] : UNDEFINED);
              Severity: Major
              Found in modules/pubmaticBidAdapter.js and 5 other locations - About 30 mins to fix
              modules/pubmaticBidAdapter.js on lines 505..505
              modules/pubmaticBidAdapter.js on lines 506..506
              modules/pubmaticBidAdapter.js on lines 507..507
              modules/pubmaticBidAdapter.js on lines 508..508
              modules/pubmaticBidAdapter.js on lines 510..510

              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

              Severity
              Category
              Status
              Source
              Language