prebid/Prebid.js

View on GitHub

Showing 5,559 of 5,559 total issues

Avoid too many return statements within this function.
Open

    if (!isStr(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/adtrueBidAdapter.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

        if (!isNumber(bid.w)) 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

          Avoid too many return statements within this function.
          Open

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

            Avoid too many return statements within this function.
            Open

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

              Avoid too many return statements within this function.
              Open

                return `${position.x}x${position.y}`;
              Severity: Major
              Found in modules/adagioBidAdapter.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

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

                    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

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

                    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 26..26
                    modules/sovrnBidAdapter.js on lines 36..36
                    modules/sovrnBidAdapter.js on lines 41..41
                    modules/sovrnBidAdapter.js on lines 43..43

                    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

                    Avoid too many return statements within this function.
                    Open

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

                      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 26..26
                      modules/sovrnBidAdapter.js on lines 36..36
                      modules/sovrnBidAdapter.js on lines 43..43
                      modules/sovrnBidAdapter.js on lines 45..45

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 45.

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

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

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

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

                      Refactorings

                      Further Reading

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

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

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 45.

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

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

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

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

                      Refactorings

                      Further Reading

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

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

                      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 26..26
                      modules/sovrnBidAdapter.js on lines 36..36
                      modules/sovrnBidAdapter.js on lines 41..41
                      modules/sovrnBidAdapter.js on lines 45..45

                      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 26..26
                      modules/sovrnBidAdapter.js on lines 36..36
                      modules/sovrnBidAdapter.js on lines 41..41
                      modules/sovrnBidAdapter.js on lines 43..43
                      modules/sovrnBidAdapter.js on lines 45..45

                      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 26..26
                      modules/sovrnBidAdapter.js on lines 41..41
                      modules/sovrnBidAdapter.js on lines 43..43
                      modules/sovrnBidAdapter.js on lines 45..45

                      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

                      Severity
                      Category
                      Status
                      Source
                      Language