Showing 506 of 506 total issues
Avoid too many return
statements within this function. Open
return 0;
Avoid too many return
statements within this function. Open
return error.num;
Avoid too many return
statements within this function. Open
return value;
Avoid too many return
statements within this function. Open
return 100 * (1 - discount * dateTime.DAYS360(settlement, maturity, false) / 360);
Avoid too many return
statements within this function. Open
return (100 - price) * 360 / (price * dateTime.DAYS360(settlement, maturity, false));
Avoid too many return
statements within this function. Open
return par * rate * dateTime.YEARFRAC(issue, settlement, basis);
Avoid too many return
statements within this function. Open
return initial;
Avoid too many return
statements within this function. Open
return 0;
Avoid too many return
statements within this function. Open
return (cost - total) * rate;
Avoid too many return
statements within this function. Open
return current;
Avoid too many return
statements within this function. Open
return error.value;
Function BITRSHIFT
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
exports.BITRSHIFT = function(number, shift) {
number = utils.parseNumber(number);
shift = utils.parseNumber(shift);
if (utils.anyIsError(number, shift)) {
return error.value;
- 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 BITLSHIFT
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
exports.BITLSHIFT = function(number, shift) {
number = utils.parseNumber(number);
shift = utils.parseNumber(shift);
if (utils.anyIsError(number, shift)) {
return error.value;
- 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 FLOOR
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
exports.FLOOR = function(number, significance) {
number = utils.parseNumber(number);
significance = utils.parseNumber(significance);
if (utils.anyIsError(number, significance)) {
return error.value;
- 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 PROPER
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
exports.PROPER = function(text) {
if (text === undefined || text.length === 0) {
return error.value;
}
if (text === true) {
- 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 REFERENCE
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
exports.REFERENCE = function (context, reference) {
if (!arguments.length) {
return error.error;
}
try {
- 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 DDB
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
exports.DDB = function(cost, salvage, life, period, factor) {
// Initialize factor
factor = (factor === undefined) ? 2 : factor;
cost = utils.parseNumber(cost);
- 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 ACCRINT
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
exports.ACCRINT = function(issue, first, settlement, rate, par, frequency, basis) {
// Return error if either date is invalid
issue = ensureDate(issue);
first = ensureDate(first);
settlement = ensureDate(settlement);
- 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 PMT
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
exports.PMT = function(rate, periods, present, future, type) {
// Credits: algorithm inspired by Apache OpenOffice
future = future || 0;
type = type || 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 FV
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
exports.FV = function(rate, periods, payment, value, type) {
// Credits: algorithm inspired by Apache OpenOffice
value = value || 0;
type = type || 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"