Showing 213 of 1,102 total issues
Function processJob
has 406 lines of code (exceeds 25 allowed). Consider refactoring. Open
function processJob(record){
var request=JSON.parse(record.request);
if (!request || !request.type || request.type==null){
var lightJob={
Function insertRecords
has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring. Open
var insertRecords=function(records, operation, callback) {
Sync(function () {
var err;
try {
sctid.bulkInsert.sync(null, records);
- 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 SCTIdBulkDataManager.js
has 738 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Created by ar on 7/16/15.
*/
var dbInit=require("../config/dbInit");
var stateMachine=require("../model/StateMachine");
Function checkSctid
has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring. Open
var checkSctid = function (sctid, callback) {
var err = "";
var partitionId = "";
var checkDigit = null;
- 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 SchemeIdBulkDataManager.js
has 626 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Created by ar on 7/16/15.
*/
var dbInit=require("../config/dbInit");
var stateMachine=require("../model/StateMachine");
File SCTIdDataManager.js
has 622 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Created by ar on 7/16/15.
*/
var dbInit=require("../config/dbInit");
var stateMachine=require("../model/StateMachine");
Function processJob
has a Cognitive Complexity of 61 (exceeds 5 allowed). Consider refactoring. Open
function processJob(record){
var request=JSON.parse(record.request);
if (!request || !request.type || request.type==null){
var lightJob={
- 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 insertRecords
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
var insertRecords=function(records, scheme, key, autoSysId, callback) {
Sync(function () {
var err;
try {
schemeid.bulkInsert.sync(null, records);
- 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 SchemeIdDataManager.js
has 461 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Created by ar on 7/16/15.
*/
var dbInit=require("../config/dbInit");
var stateMachine=require("../model/StateMachine");
Function findFieldSelect
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
job.findFieldSelect=function(query, fields,limit, skip,orderBy, callback){
db.getDB(function (err,connection)
{
if (err) throw err;
if (!query){
- 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 checkSctid
has 172 lines of code (exceeds 25 allowed). Consider refactoring. Open
var checkSctid = function (sctid, callback) {
var err = "";
var partitionId = "";
var checkDigit = null;
File BackEndJobService.js
has 450 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Created by ar on 7/31/15.
*/
var job=require("../model/JobType");
File SctidBulk.js
has 433 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Created by alo on 7/13/15.
*/
'use strict';
File Sctid.js
has 432 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Created by alo on 7/13/15.
*/
'use strict';
Function registerSctid
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
var registerSctid=function (operation, callback) {
if (!operation.autoSysId) {
getSctidBySystemId(operation.namespace, operation.systemId, function (err, sctid) {
if (err) {
- 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 registerSchemeId
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
var registerSchemeId=function (scheme, operation, callback){
if (!operation.autoSysId) {
getSchemeIdBySystemId(scheme, operation.systemId, function (err, schemeId) {
if (err) {
- 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
Method run
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void run(ApplicationArguments args) throws Exception {
System.out.println("\nThis process will synchronise the sequence of every partition within every namespace\n" +
"from the source CIS instance to the target CIS instance\n" +
"where the partition is available on both sides.\n");
- 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 getStats
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports.getStats = function getStats(username, callback){
dbInit.getDB(function (err, pdb, model) {
if (err)
throw err;
else{
Function registerSctidsSmallRequest
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
var registerSctidsSmallRequest=function (operation, callback) {
Sync(function () {
try {
var cont = 0;
- 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 registerSchemeIds
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
var registerSchemeIds=function ( operation, callback) {
Sync(function () {
try {
var cont = 0;
var records = [];
- 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"