extension/Shared (Extension)/Resources/browser-polyfill.js

Summary

Maintainability
F
1 wk
Test Coverage

Function wrapAPIs has 957 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    const wrapAPIs = extensionAPIs => {
      // NOTE: apiMetadata is associated to the content of the api-metadata.json file
      // at build time by replacing the following "include" with the content of the
      // JSON file.
      const apiMetadata = {
Severity: Major
Found in extension/Shared (Extension)/Resources/browser-polyfill.js - About 4 days to fix

    File browser-polyfill.js has 983 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    (function (global, factory) {
      if (typeof define === "function" && define.amd) {
        define("webextension-polyfill", ["module"], factory)
      } else if (typeof exports !== "undefined") {
        factory(module)
    Severity: Major
    Found in extension/Shared (Extension)/Resources/browser-polyfill.js - About 2 days to fix

      Function wrapObject has 59 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            const wrapObject = (target, wrappers = {}, metadata = {}) => {
              let cache = Object.create(null)
              let handlers = {
                has (proxyTarget, prop) {
                  return prop in target || prop in cache
      Severity: Major
      Found in extension/Shared (Extension)/Resources/browser-polyfill.js - About 2 hrs to fix

        Function onMessageWrappers has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              const onMessageWrappers = new DefaultWeakMap(listener => {
                if (typeof listener !== "function") {
                  return listener
                }
        
        
        Severity: Minor
        Found in extension/Shared (Extension)/Resources/browser-polyfill.js - About 1 hr to fix

          Function onMessage has 42 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  return function onMessage (message, sender, sendResponse) {
                    let didCallSendResponse = false
                    let wrappedSendResponse
                    let sendResponsePromise = new Promise(resolve => {
                      wrappedSendResponse = function (response) {
          Severity: Minor
          Found in extension/Shared (Extension)/Resources/browser-polyfill.js - About 1 hr to fix

            Function get has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                      get (proxyTarget, prop, receiver) {
                        if (prop in cache) {
                          return cache[prop]
                        }
                        if (!(prop in target)) {
            Severity: Minor
            Found in extension/Shared (Extension)/Resources/browser-polyfill.js - About 1 hr to fix

              Function wrapAsyncFunction has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    const wrapAsyncFunction = (name, metadata) => {
                      return function asyncFunctionWrapper (target, ...args) {
                        if (args.length < metadata.minArgs) {
                          throw new Error(`Expected at least ${metadata.minArgs} ${pluralizeArguments(metadata.minArgs)} for ${name}(), got ${args.length}`)
                        }
              Severity: Minor
              Found in extension/Shared (Extension)/Resources/browser-polyfill.js - About 1 hr to fix

                Function asyncFunctionWrapper has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        return function asyncFunctionWrapper (target, ...args) {
                          if (args.length < metadata.minArgs) {
                            throw new Error(`Expected at least ${metadata.minArgs} ${pluralizeArguments(metadata.minArgs)} for ${name}(), got ${args.length}`)
                          }
                          if (args.length > metadata.maxArgs) {
                Severity: Minor
                Found in extension/Shared (Extension)/Resources/browser-polyfill.js - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                    if (!(globalThis.browser && globalThis.browser.runtime && globalThis.browser.runtime.id)) {
                      const CHROME_SEND_MESSAGE_CALLBACK_NO_RESPONSE_MESSAGE = "The message port closed before a response was received."
                  
                      // Wrapping the bulk of this polyfill in a one-time-use function is a minor
                      // optimization for Firefox. Since Spidermonkey does not fully parse the
                  Severity: Major
                  Found in extension/Shared (Extension)/Resources/browser-polyfill.js - About 1 hr to fix

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

                            "runtime": {
                              "getBackgroundPage": {
                                "minArgs": 0,
                                "maxArgs": 0
                              },
                    Severity: Major
                    Found in extension/Shared (Extension)/Resources/browser-polyfill.js and 1 other location - About 4 hrs to fix
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 678..707

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

                    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

                            "windows": {
                              "create": {
                                "minArgs": 0,
                                "maxArgs": 1
                              },
                    Severity: Major
                    Found in extension/Shared (Extension)/Resources/browser-polyfill.js and 1 other location - About 4 hrs to fix
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 462..491

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                            "cookies": {
                              "get": {
                                "minArgs": 1,
                                "maxArgs": 1
                              },
                    Severity: Major
                    Found in extension/Shared (Extension)/Resources/browser-polyfill.js and 4 other locations - About 2 hrs to fix
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 366..387
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 388..409
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 507..528
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 539..560

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                            "notifications": {
                              "clear": {
                                "minArgs": 1,
                                "maxArgs": 1
                              },
                    Severity: Major
                    Found in extension/Shared (Extension)/Resources/browser-polyfill.js and 4 other locations - About 2 hrs to fix
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 220..241
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 366..387
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 507..528
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 539..560

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                              "sync": {
                                "clear": {
                                  "minArgs": 0,
                                  "maxArgs": 0
                                },
                    Severity: Major
                    Found in extension/Shared (Extension)/Resources/browser-polyfill.js and 4 other locations - About 2 hrs to fix
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 220..241
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 366..387
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 388..409
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 507..528

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                            "management": {
                              "get": {
                                "minArgs": 1,
                                "maxArgs": 1
                              },
                    Severity: Major
                    Found in extension/Shared (Extension)/Resources/browser-polyfill.js and 4 other locations - About 2 hrs to fix
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 220..241
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 388..409
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 507..528
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 539..560

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                              "local": {
                                "clear": {
                                  "minArgs": 0,
                                  "maxArgs": 0
                                },
                    Severity: Major
                    Found in extension/Shared (Extension)/Resources/browser-polyfill.js and 4 other locations - About 2 hrs to fix
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 220..241
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 366..387
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 388..409
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 539..560

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

                    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

                            "permissions": {
                              "contains": {
                                "minArgs": 1,
                                "maxArgs": 1
                              },
                    Severity: Major
                    Found in extension/Shared (Extension)/Resources/browser-polyfill.js and 1 other location - About 1 hr to fix
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 38..55

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

                    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

                            "alarms": {
                              "clear": {
                                "minArgs": 0,
                                "maxArgs": 1
                              },
                    Severity: Major
                    Found in extension/Shared (Extension)/Resources/browser-polyfill.js and 1 other location - About 1 hr to fix
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 444..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 70.

                    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 (args.length < metadata.minArgs) {
                                throw new Error(`Expected at least ${metadata.minArgs} ${pluralizeArguments(metadata.minArgs)} for ${name}(), got ${args.length}`)
                              }
                    Severity: Major
                    Found in extension/Shared (Extension)/Resources/browser-polyfill.js and 3 other locations - About 1 hr to fix
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 823..825
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 1155..1157
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 1158..1160

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

                    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 (args.length > metadata.maxArgs) {
                                throw new Error(`Expected at most ${metadata.maxArgs} ${pluralizeArguments(metadata.maxArgs)} for ${name}(), got ${args.length}`)
                              }
                    Severity: Major
                    Found in extension/Shared (Extension)/Resources/browser-polyfill.js and 3 other locations - About 1 hr to fix
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 820..822
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 1155..1157
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 1158..1160

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

                    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 (args.length > metadata.maxArgs) {
                              throw new Error(`Expected at most ${metadata.maxArgs} ${pluralizeArguments(metadata.maxArgs)} for ${name}(), got ${args.length}`)
                            }
                    Severity: Major
                    Found in extension/Shared (Extension)/Resources/browser-polyfill.js and 3 other locations - About 1 hr to fix
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 820..822
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 823..825
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 1155..1157

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

                    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 (args.length < metadata.minArgs) {
                              throw new Error(`Expected at least ${metadata.minArgs} ${pluralizeArguments(metadata.minArgs)} for ${name}(), got ${args.length}`)
                            }
                    Severity: Major
                    Found in extension/Shared (Extension)/Resources/browser-polyfill.js and 3 other locations - About 1 hr to fix
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 820..822
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 823..825
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 1158..1160

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

                    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

                            "contextMenus": {
                              "remove": {
                                "minArgs": 1,
                                "maxArgs": 1
                              },
                    Severity: Minor
                    Found in extension/Shared (Extension)/Resources/browser-polyfill.js and 1 other location - About 55 mins to fix
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 492..505

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 54.

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

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

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

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

                    Refactorings

                    Further Reading

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

                            "sessions": {
                              "getDevices": {
                                "minArgs": 0,
                                "maxArgs": 1
                              },
                    Severity: Minor
                    Found in extension/Shared (Extension)/Resources/browser-polyfill.js and 1 other location - About 55 mins to fix
                    extension/Shared (Extension)/Resources/browser-polyfill.js on lines 206..219

                    Duplicated Code

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

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

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

                    Tuning

                    This issue has a mass of 54.

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

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

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

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

                    Refactorings

                    Further Reading

                    There are no issues that match your filters.

                    Category
                    Status