Showing 13 of 45 total issues
Function processRow
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
async processRow(stream, reject, data) {
try {
stream.pause();
logger.debug(`[ImporterService] Processing row for file ${this.url}`);
try {
Function exports
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = (grunt) => {
grunt.file.setBase('..');
// eslint-disable-next-line import/no-extraneous-dependencies
require('load-grunt-tasks')(grunt);
Function constructor
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor() {
logger.info(`Connecting to Elasticsearch at ${elasticUrl}`);
const elasticSearchConfig = {
node: elasticUrl
Function requestDownloadFile
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
new Bluebird((resolve, reject) => {
logger.debug(`[DownloadService] Sending request to ${url}`);
try {
let dlprogress = 0;
let oldProgress = 0;
Function createIndex
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
async createIndex(index, legend) {
logger.debug(`Creating index ${index} in elastic`);
const body = {
settings: {
index: {
Function start
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
async start() {
// eslint-disable-next-line no-async-promise-executor
return new Promise(async (resolve, reject) => {
let converter;
try {
Function constructor
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
constructor() {
logger.info(`Connecting to Elasticsearch at ${elasticUrl}`);
const elasticSearchConfig = {
node: elasticUrl
- 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 processRow
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
async processRow(stream, reject, data) {
try {
stream.pause();
logger.debug(`[ImporterService] Processing row for file ${this.url}`);
try {
- 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 processMessage
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
static async processMessage(msg, executorQueueService) {
// logger.debug('Processing message', msg);
switch (msg.type) {
case ExecutionMessages.EXECUTION_CREATE:
Function consume
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
async consume(msg) {
let message = null;
try {
logger.debug('[Executor Queue] Message received', msg.content.toString());
message = JSON.parse(msg.content.toString());
Function consume
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
async consume(msg) {
let message = null;
try {
logger.debug('[Executor Queue] Message received', msg.content.toString());
message = JSON.parse(msg.content.toString());
- 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 init
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
async init() {
if (this.checkURL.test(this.url)) {
logger.debug('[CSVConverter] Is a url. Downloading file');
const exists = await DownloadService.checkIfExists(this.url);
if (!exists) {
- 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 deleteIndex
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
static async deleteIndex(msg) {
logger.debug('Deleting index', msg.index);
try {
await elasticService.deleteIndex(msg.index);
} catch (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"