Showing 62 of 64 total issues
Avoid too many return
statements within this function. Open
Open
return {
bsonType: ['date'],
}
Avoid too many return
statements within this function. Open
Open
return {
bsonType: ['double'],
}
Avoid too many return
statements within this function. Open
Open
return undefined
Avoid too many return
statements within this function. Open
Open
return val.$numberInt
Avoid too many return
statements within this function. Open
Open
return `{ ${entries
.map(
([key, value]) =>
`${wrapKey(key)}: ${stringify(
value,
Avoid too many return
statements within this function. Open
Open
return {
bsonType: ['maxKey'],
}
Avoid too many return
statements within this function. Open
Open
return `Timestamp(${val.$timestamp.t}, ${val.$timestamp.i})`
Avoid too many return
statements within this function. Open
Open
return null
Avoid too many return
statements within this function. Open
Open
return {
bsonType: ['timestamp'],
}
Avoid too many return
statements within this function. Open
Open
return item === null ? undefined : JSON.parse(item)
Avoid too many return
statements within this function. Open
Open
return `MinKey()`
Avoid too many return
statements within this function. Open
Open
return val.length
? `[\n${val
.map(
(v) =>
`${extraSpaces}${spaces}${stringify(
Avoid too many return
statements within this function. Open
Open
return `NumberLong("${val.$numberLong}")`
Avoid too many return
statements within this function. Open
Open
return {
bsonType: ['int'],
}
Avoid too many return
statements within this function. Open
Open
return `NumberDecimal("${val.$numberDecimal}")`
Avoid too many return
statements within this function. Open
Open
return (
<>
<DefaultDialog
hidden={isDialogHidden}
title="Drop Index"
Avoid too many return
statements within this function. Open
Open
return undefined
Avoid too many return
statements within this function. Open
Open
return `BinData(${parseInt(val.$binary.subType, 16)}, "${
val.$binary.base64
}")`
Function postProcessSchema
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
function postProcessSchema(schema: Schema): Schema {
const bsonTypes = uniq(schema.bsonType)
return omitBy(
{
bsonType: bsonTypes.length === 1 ? bsonTypes[0] : bsonTypes,
- 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 ProfilingBottomStack
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
export default function ProfilingBottomStack() {
const [{ conn, database }] = useRouterQuery()
const connection = useConnection(conn)
const host = useAppSelector((state) => state.profiling.host)
const profilingConnection = host
- 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"