packages/irc2as/src/index.js
Function __processIRCCodes
has 143 lines of code (exceeds 25 allowed). Consider refactoring. Wontfix
Wontfix
__processIRCCodes(
code,
server,
channel,
pos1,
Function __processIRCCodes
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Wontfix
Wontfix
__processIRCCodes(
code,
server,
channel,
pos1,
- 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
File index.js
has 256 lines of code (exceeds 250 allowed). Consider refactoring. Invalid
Invalid
const events = require("events");
const debug = require("debug")("irc2as");
const ASEmitter = require("./as-emitter");
const EVENT_INCOMING = "incoming",
Function input
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Invalid
Invalid
input(incoming) {
debug(incoming);
if (typeof incoming !== "string") {
debug("unable to process incoming message as it was not a string.");
return false;
Function input
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Wontfix
Wontfix
input(incoming) {
debug(incoming);
if (typeof incoming !== "string") {
debug("unable to process incoming message as it was not a string.");
return false;
- 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"