Showing 726 of 2,177 total issues
Function addMembership
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function addMembership(objectType, collaboration, userAuthor, userTarget, workflow, actor) {
Function submit
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function submit(description, cronTime, job, context, opts, callback) {
Function store
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function store(req, res) {
var data = req.body;
if (!data.hostname || !data.port || !data.dbname) {
- 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 checkMemberAccounts
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function checkMemberAccounts(req, res, next) {
const accountList = req.body.accounts;
const errorMessage = {
error: {
- 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 list
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function list(req, res) {
const user = req.user;
const query = {};
if (req.query.limit) {
- 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 getMembers
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function getMembers(req, res) {
const query = {};
if (req.query.limit) {
const limit = parseInt(req.query.limit, 10);
- 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 Task
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function Task(id, job, delay, context, onComplete, onCancel) {
Function profileToUser
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
module.exports.profileToUser = function(profile, user) {
user = user || {};
user.firstname = profile.name.givenName ? profile.name.givenName : '';
user.lastname = profile.name.familyName ? profile.name.familyName : '';
user.job_title = profile._json.occupation ? profile._json.occupation : '';
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(dependencies) {
const logger = dependencies('logger');
const esnConfig = dependencies('esn-config');
const config = dependencies('config')('default');
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function(dependencies) {
var logger = dependencies('logger');
var userModule = dependencies('user');
var config = dependencies('config')('cronjob');
- 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 validateConnection
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function validateConnection(hostname, port, dbname, username, password, callback) {
Function _createInterface
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
_createInterface(topic) {
return {
subscribe: handler => {
if (!this.client) {
return this._addCache(topic, 'subscribe', handler);
- 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 buildConnectionString
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function buildConnectionString(hostname, port, dbname, username, password, connectionOptions) {
Function userMessageCommentToTimelineEntry
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
module.exports.userMessageCommentToTimelineEntry = function(comment, verb, user, shares, inReplyTo, date) {
Function _createInterface
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
_createInterface(topic) {
return {
subscribe: handler => {
this._addCache(topic, ACTION_SUBSCRIBE, handler);
- 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 store
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
module.exports.store = function(id, contentType, metadata, stream, options, callback) {
Function join
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function join(objectType, collaboration, userAuthor, userTarget, actor, callback) {
Function unregister
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
var unregister = $rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams, options) {
Function esnDatetimeDatePickerController
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function esnDatetimeDatePickerController($scope, $element, $compile, $timeout, moment, esnDatetimeService) {
Function messageActionsController
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$log,
$rootScope,
activitystreamAPI,
esnMessageService,
notificationFactory,