Showing 55 of 81 total issues
Function exports
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function () {
return function (irc) {
irc.whoisCallbacks = {};
/**
- 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 exports
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function () {
var channelCache = {},
channelList = {};
return function (irc) {
Function exports
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function () {
return function (irc) {
irc.nick = function ircNick(nick, network, fn) {
if (!network) network = '0';
this.networked_me[network] = this.getUser(nick, network);
Function exports
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function () {
return function (irc) {
irc.on('data', function (err, msg) {
var network = msg.network;
if (msg.command === 'JOIN' && irc.capabilities.indexOf('extended-join') > -1) {
- 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 exports
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function () {
return function (irc) {
irc.part = function ircPart(channels, msg, network, fn) {
if (typeof msg === 'function') {
fn = msg;
- 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 write
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Client.prototype.write = function (str, network, fn) {
// if network is the callback, then it wasn't defined either
if (typeof(network) === 'function') {
fn = network;
network = undefined;
- 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 exports
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function () {
return function (irc) {
irc.part = function ircPart(channels, msg, network, fn) {
if (typeof msg === 'function') {
fn = msg;
Function exports
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function () {
return function (irc) {
function emitCommand(event, text) {
var message = irc.splitString(text);
debug("message: %s", JSON.stringify(message));
Function exports
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function () {
var serverInfo = {};
return function (irc) {
irc.getServerInfo = function (network) {
Function exports
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function () {
return function (irc) {
irc.kick = function ircKick(channels, nicks, msg, network, fn) {
if (typeof msg === 'function') {
fn = msg;
Function exports
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function () {
return function (irc) {
irc.sasl = {
method: '',
mechanism: function saslMechanism(mechanism, network, fn) {
- 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 exports
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function () {
return function (irc) {
irc.kick = function ircKick(channels, nicks, msg, network, fn) {
if (typeof msg === 'function') {
fn = msg;
- 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 exports
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function () {
return function (irc) {
irc.on('data', function (err, msg) {
var network = msg.network;
if (msg.command === 'RPL_AWAY') {
- 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 parsePrefix
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Parser.prototype._parseParams = function parsePrefix() {
while (this.position < this.line.length) {
this.space = this.line.indexOf(" ", this.position);
// Trailing!
- 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 add
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Client.prototype.add = function (info) {
var stream, stream_id, streams = [];
var _this = this;
if (info instanceof Array) {
// We've been passed multiple server information
- 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 exports
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function () {
return function (irc) {
irc.identify = function (username, password, network, fn) {
if (typeof network === 'function') {
fn = network;
Function emit
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.emit = function (instance, network, event, data) {
if (!data) {
data = {};
}
Function exports
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function () {
return function (irc) {
/**
* Quit the network.
*
Function exports
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function () {
return function (irc) {
irc.nick = function ircNick(nick, network, fn) {
if (!network) network = '0';
this.networked_me[network] = this.getUser(nick, network);
- 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 exports
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function () {
return function (irc) {
irc.topic = function ircTopic(channel, topic, network, fn) {
var parse = utils.parseTarget(channel);
if (!network) { network = parse.network; }
- 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"