Showing 244 of 590 total issues
Function getUserType
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
var getUserType = function(classRes, username, ignoreStudents, ignoreAssistants, ignoreTeachers) {
Function createIndex
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
kibana.createIndex = function(config, indexName, indexTemplateId, user, esClient) {
Function getUserType
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
classes.getUserType = function(classId, username, ignoreStudents, ignoreAssistants, ignoreTeachers) {
Function getUserTypeForArray
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
groupings.getUserTypeForArray = function(groupingIds, username, ignoreStudents, ignoreAssistants, ignoreTeachers) {
Function createKibanaIndices
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
kibana.createKibanaIndices = function (indexName, indexTemplateId, user, config, esClient) {
Function updateResult
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
activities.updateResult = function (activityId, resultId, update, username, esClient) {
Function connectToDB
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
var connectToDB = function (connectionString, dbVar) {
MongoClient.connect(connectionString, function (err, db) {
if (err) {
console.log(err);
console.log('Impossible to connect to MongoDB. Retrying in 5s');
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
module.exports = (function () {
var Collection = require('easy-collections');
var players = new Collection(require('./db'), 'players');
/**
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
module.exports = (function() {
var Collection = require('easy-collections');
var _ = require('underscore');
var db = require('./db');
var versions = new Collection(db, 'versions');
- 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 parseCSV
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
var parseCSV = function (trace) {
trace = trace.replace('\r', '');
var list = [];
var escape = 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"
Further reading
Function toTrace
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
var toTrace = function (statement, trace) {
var actor = statement.actor;
if (actor) {
var name = actor.name;
- 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
Avoid too many return
statements within this function. Open
return extensions.indexOf(i) !== -1;
Avoid too many return
statements within this function. Open
return logError('Controllers are pending, but no transforms are possible (system locked)!',
status, callback);
Avoid too many return
statements within this function. Open
return equal;
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return csvtraces;
Avoid too many return
statements within this function. Open
return buildReturnError('Object definition is missing for statement, ' + statement);
Avoid too many return
statements within this function. Open
return {
error: 'No score cell (G' + playerId + ') value found on sheet ' + question
};
Avoid too many return
statements within this function. Open
return {
error: 'Unexpected error: ' + err.toString()
};
Avoid too many return
statements within this function. Open
return {
error: 'No response cell (D' + playerId + ') value found on sheet ' + question
};