Showing 191 of 352 total issues
Function exports
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
module.exports = (app, net, filestore, NativeClient) => ({
name: 'deliverMinidumps',
load: (client) => {
if (!isEnabledFor(client)) {
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
Function leaveBreadcrumb
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
leaveBreadcrumb (message, metadata, type) {
// coerce bad values so that the defaults get set
message = typeof message === 'string' ? message : ''
type = (typeof type === 'string' && includes(BREADCRUMB_TYPES, type)) ? type : 'manual'
metadata = typeof metadata === 'object' && metadata !== null ? metadata : {}
- 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 buildIOS
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
buildIOS: function buildIOS () {
try {
const version = process.env.NOTIFIER_VERSION || common.determineVersion()
const rnVersion = process.env.REACT_NATIVE_VERSION
const registryUrl = process.env.REGISTRY_URL
- 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 configure
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export async function configure (projectRoot: string, options: Options, logger: Logger): Promise<void> {
const manifestPath = path.join(projectRoot, 'android', 'app', 'src', 'main', 'AndroidManifest.xml')
try {
const manifest = await fs.readFile(manifestPath, 'utf8')
- 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 insertIos
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export async function insertIos (projectRoot: string, logger: Logger): Promise<void> {
logger.info('Adding Bugsnag to the iOS layer')
const iosDir = path.join(projectRoot, 'ios')
let appDelegatePath
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
module.exports = (win = window) => ({
load: (client) => {
if (!('addEventListener' in win)) return
if (!client._isBreadcrumbTypeEnabled('user')) 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
Avoid too many return
statements within this function. Open
return safeArray
Avoid too many return
statements within this function. Open
return true
Avoid too many return
statements within this function. Open
return throwsMessage(err)
Avoid too many return
statements within this function. Open
return safeObj
Avoid too many return
statements within this function. Open
return '[Circular]'
Avoid too many return
statements within this function. Open
return '7.+'
Avoid too many return
statements within this function. Open
if (!await automateSymbolication(projectRoot, urls)) return
Avoid too many return
statements within this function. Open
return '8.+'
Avoid too many return
statements within this function. Open
if (!await configure(projectRoot, urls)) return
Avoid too many return
statements within this function. Open
return
Avoid too many return
statements within this function. Open
return parts.join('')
Avoid too many return
statements within this function. Open
if (el.parentNode) return `${getNodeSelector(el.parentNode, win)} > ${parts.join('')}`
Function _deliverMinidump
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
async _deliverMinidump (minidump) {
let shouldSendMinidump = true
let eventJson = await this._readEvent(minidump.eventPath)
if (eventJson && this._onSendError.length > 0) {
- 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 6 (exceeds 5 allowed). Consider refactoring. Open
module.exports = app => ({
load (client) {
if (!client._config.autoDetectErrors) return
if (!client._config.enabledErrorTypes.unhandledExceptions) 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"