Showing 61 of 64 total issues
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return value;
Avoid too many return
statements within this function. Open
return "";
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return to_padded_hex_string(value, 4);
Avoid too many return
statements within this function. Open
return value;
Avoid too many return
statements within this function. Open
return "";
Avoid too many return
statements within this function. Open
return value;
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return str1 + to_padded_hex_string(value, 8);
Avoid too many return
statements within this function. Open
return "";
Avoid too many return
statements within this function. Open
return "";
Avoid too many return
statements within this function. Open
return (item == "1") ? (true) : (false);
Avoid too many return
statements within this function. Open
return decode_signed(item, 0x10000);
Avoid too many return
statements within this function. Open
return count;
Avoid too many return
statements within this function. Open
return null;
Avoid too many return
statements within this function. Open
return null;
Function verify
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
verify(config) {
this._reset();
if (config.length == 0) {
this.section = "Config";
- 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 decode_signed
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function decode_signed(item, capacity) {
let reHex = /^[\dA-Fa-f]{1,}$/;
if (reHex.test(item) == true) {
let value = parseInt(item, 16);
- 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 _decode_subpacket
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_decode_subpacket(subpacket) {
const parts = subpacket.split(this._config["separator"]);
if (parts != ['']) {
const payload = [];
- 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"