Showing 46 of 1,345 total issues
Function retrieveWinDeps
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const retrieveWinDeps = async () => {
const fileExists = fs.existsSync(fileWithDepsTag)
if (!fileExists && !envCurlForWindowsDepsVersionTag) {
console.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 setUploadStream
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
setUploadStream(stream: Readable | null) {
if (!stream) {
if (this.readFunctionStream) {
this.cleanupReadFunctionStreamEvents()
this.readFunctionStream = null
- 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 fileIsComing
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function fileIsComing(fileInfo, remains) {
console.log(
util.format(
'Remaining entries: %d / Current: %s / Size: %d - ',
remains,
- 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 gracefulShutdown
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function gracefulShutdown(server, options = {}) {
const {
gracePeriod = process.env.GRACEFUL_SHUTDOWN_GRACE_PERIOD_MS || 5000,
onShutdown = noopFn,
} = options
- 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 dupHandle
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
dupHandle(shouldCopyEventListeners = true) {
const duplicatedHandle = new Curl(this.handle.dupHandle())
const eventsToCopy = ['end', 'error', 'data', 'header']
duplicatedHandle.features = this.features
- 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 run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const run = async () => {
const curlOptionsFilePath = path.resolve(
__dirname,
'../lib/generated/CurlOption.ts',
)
- 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"