Showing 30 of 111 total issues
Function forwardStrategy
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function forwardStrategy (route, opts, req, res, resolver) {
Function exports
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
module.exports = function (opts, res, task, done, onRetry) {
Function replayer
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function replayer (route, replayReq, replayRes, opts, next) {
Function dispatchConcurrently
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Dispatcher.prototype.dispatchConcurrently = function (opts, req, socket, head, done) {
Function forwardRequest
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function forwardRequest (route, opts, forwardReq, res, done) {
Function dispatch
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Dispatcher.prototype.dispatch = function (req, res, next) {
if (this.route.unregistered) return next('route')
const route = this.route
const opts = this.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 concurrently
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
exports.concurrently = function (args, done) {
var pending = exports.passes.length
function finish (err, res) {
if (err) return done(err)
- 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 replayer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function replayer (route, replayReq, replayRes, opts, next) {
return function doReplay (err) {
if (err) {
return route.emit('replay:error', err, replayReq, replayRes)
}
- 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 setRequestParams
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function setRequestParams (req, opts) {
const target = req.rocky.options.target || opts.target
const url = parseUrl(target)
const params = setupReq(opts.ssl || {}, opts, req)
- 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 defineHostHeader
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function defineHostHeader (forwardReq, opts) {
const forwardHost = opts.forwardHost
if (!forwardHost) return
const headers = forwardReq.headers
- 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"