Showing 324 of 527 total issues
Function exports
has 832 lines of code (exceeds 25 allowed). Consider refactoring. Open
.then((Taggable, Role, knex) => {
SCli.debug(__MODULE_NAME, 'READY');
/**
Function exports
has 623 lines of code (exceeds 25 allowed). Consider refactoring. Open
.then((knex) => {
return knex
.schema
.dropTableIfExists('objection')
.then(() => {
Function exports
has 492 lines of code (exceeds 25 allowed). Consider refactoring. Open
.then((knex) => {
SCli.debug(__MODULE_NAME, 'Knex initted');
return Schema
Function exports
has a Cognitive Complexity of 112 (exceeds 5 allowed). Consider refactoring. Open
.then((knex) => {
return knex
.schema
.dropTableIfExists('objection')
.then(() => {
- 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 index.js
has 853 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint no-underscore-dangle:0 */
/* jslint node:true, esnext:true */
/* globals LACKEY_PATH */
'use strict';
Function exports
has 377 lines of code (exceeds 25 allowed). Consider refactoring. Open
.then((Taggable, User, Taxonomy, TaxonomyType, Template, knexSchema, QueryBuilder, configuration) => {
SCli.debug(__MODULE_NAME, 'READY');
class ContentModel extends Model {
Function exports
has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring. Open
.then((Taggable, Role, knex) => {
SCli.debug(__MODULE_NAME, 'READY');
/**
- 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 363 lines of code (exceeds 25 allowed). Consider refactoring. Open
.then((ContentModel, Taxonomy, TaxonomyType, Template, User, Preview) => {
class PageController {
static preview(req, res, next) {
File structure.ui.js
has 740 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint no-cond-assign:0, no-new:0, no-unused-vars:0 */
/* jslint browser:true, node:true, esnext:true */
'use strict';
/*
Copyright 2016 Enigma Marketing Services Limited
Function exports
has 335 lines of code (exceeds 25 allowed). Consider refactoring. Open
.then((Taggable, QueryBuilder) => {
SCli.debug(__MODULE_NAME, 'READY');
class MediaModel extends Model {
Function format
has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring. Open
module.exports.format = (req, res, next) => {
var isYAML = (/(.*).yaml/).test(req.path),
isJSON = !isYAML && ((/(.*).json$/).test(req.path) || (/^\/api\//).test(req.path)),
isXLS = !isJSON && !isYAML && (/(.*).xlsx/).test(req.path),
isHTML = !isJSON && !isYAML && !isXLS;
- 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 table.js
has 643 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* jslint node:true, esnext:true, es6:true, browser:true, loopfunc:true*/
/* eslint no-param-reassign:0 no-alert:0 */
'use strict';
/*
Copyright 2016 Enigma Marketing Services Limited
File index.js
has 636 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint no-underscore-dangle:0 */
/* jslint node:true, esnext:true */
/* globals LACKEY_PATH */
'use strict';
Function exports
has 271 lines of code (exceeds 25 allowed). Consider refactoring. Open
.then((Taggable, TaxonomyType) => {
SCli.debug(__MODULE_NAME, 'READY');
/**
Function print
has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring. Open
function print(chunk, data, type, editMode, dust, log, config) {
let source;
SCli.debug('lackey-cms/modules/cms/server/lib/dust/media', 'Print', JSON.stringify(data, null, 4));
- 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 60 (exceeds 5 allowed). Consider refactoring. Open
.then((knex) => {
class ContentQueryBuilder {
constructor() {
- 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 224 lines of code (exceeds 25 allowed). Consider refactoring. Open
.then((User, Session) => {
return {
index: (req, res) => {
let data = {};
Function exports
has 211 lines of code (exceeds 25 allowed). Consider refactoring. Open
.then((Model, Template, Taxonomy, Crud) => {
class ContentCtrl extends Crud {
static get model() {
return this._overriden('model', Model);
Function exports
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
.then((Taggable, User, Taxonomy, TaxonomyType, Template, knexSchema, QueryBuilder, configuration) => {
SCli.debug(__MODULE_NAME, 'READY');
class ContentModel extends Model {
- 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 knex.js
has 501 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint no-underscore-dangle:0 */
/* jslint node:true, esnext:true */
/* global LACKEY_PATH */
'use strict';