Showing 191 of 352 total issues
Function exports
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
module.exports = (_ignoredUrls = [], win = window) => {
let restoreFunctions = []
const plugin = {
load: client => {
if (!client._isBreadcrumbTypeEnabled('request')) return
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File Gradle.test.ts
has 444 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { getSuggestedBugsnagGradleVersion, modifyAppBuildGradle, modifyRootBuildGradle, checkReactNativeMappings, addUploadEndpoint, addBuildEndpoint } from '../Gradle'
import logger from '../../Logger'
import path from 'path'
import { promises as fs } from 'fs'
Function exports
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = (_ignoredUrls = [], win = window) => {
let restoreFunctions = []
const plugin = {
load: client => {
if (!client._isBreadcrumbTypeEnabled('request')) return
Function load
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
load (client) {
const leaveBreadcrumb = (event, currentRouteName, previousRouteName) => {
if (!client._isBreadcrumbTypeEnabled('navigation')) return
client.leaveBreadcrumb(
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function load
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
load: (client) => {
if (!client._config.trackInlineScripts) return
const originalLocation = win.location.href
let html = ''
Function delivery
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
const delivery = (client, filestore, net, app) => {
const noop = () => {}
const send = (opts, body, cb) => {
let errorCallback = (error, response) => {
Function load
has 115 lines of code (exceeds 25 allowed). Consider refactoring. Open
load: client => {
if (!client._isBreadcrumbTypeEnabled('request')) return
const ignoredUrls = [
client._config.endpoints.notify,
Function delivery
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
const delivery = (client, filestore, net, app) => {
const noop = () => {}
const send = (opts, body, cb) => {
let errorCallback = (error, response) => {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function normaliseError
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
const normaliseError = (maybeError, tolerateNonErrors, component, logger) => {
let error
let internalFrames = 0
const createAndLogInputError = (reason) => {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function exports
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
module.exports = (client, win = window) => ({
sendEvent: (event, cb = () => {}) => {
try {
const url = client._config.endpoints.notify
const req = new win.XMLHttpRequest()
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function exports
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
module.exports = (win = window, component = 'window onerror') => ({
load: (client) => {
if (!client._config.autoDetectErrors) return
if (!client._config.enabledErrorTypes.unhandledExceptions) return
function onerror (messageOrEvent, url, lineNo, charNo, error) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function load
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
load: (client) => {
client.addOnBreadcrumb(breadcrumb => {
// we copy the breadcrumb's properties over to a new object to ensure its
// to JSON() method doesn't get called before passing the object over the
// bridge. This happens in the remote debugger and means the "message"
Client
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class Client {
constructor (configuration, schema = config.schema, internalPlugins = [], notifier) {
// notifier id
this._notifier = notifier
Function load
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
load (client) {
const app = {}
const lastRunInfo = filestore.getLastRunInfo()
const updateApp = createAppUpdater(client, NativeClient, app)
const updateNextCrashLastRunInfo = createLastRunInfoUpdater(client, NativeClient)
Function exports
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
module.exports = (win = window) => {
const plugin = {
load: (client) => {
if (!client._config.autoDetectErrors || !client._config.enabledErrorTypes.unhandledRejections) return
const listener = evt => {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function load
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
load (client) {
const device = {}
let cachedDevice = {}
try {
Function updateBuildReactNativeTask
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
async function updateBuildReactNativeTask (buildPhaseMap: Record<string, Record<string, unknown>>, iosDir: string, reactNativeVersion: string | undefined, logger: Logger): Promise<boolean> {
let didAnythingUpdate = false
let didThisUpdate
for (const shellBuildPhaseKey in buildPhaseMap) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function load
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
load: (client) => {
const emitter = new EventEmitter()
// proxy all state updates from within the main process
// so that we can emit events for the changes
File Insert.test.ts
has 291 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { insertJs, insertAndroid, insertIos } from '../Insert'
import logger from '../../Logger'
import path from 'path'
import { promises as fs } from 'fs'
import glob from 'glob'
Function exports
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (data) {
const seen = []
const visit = (obj) => {
if (obj === null || obj === undefined) return obj
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"