getlackey/lackey-cms

View on GitHub

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');

        /**
Severity: Major
Found in modules/core/server/models/user/index.js - About 4 days to fix

    Function exports has 623 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        .then((knex) => {
            return knex
                .schema
                .dropTableIfExists('objection')
                .then(() => {
    Severity: Major
    Found in modules/core/server/models/objection/index.js - About 3 days to fix

      Function exports has 492 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          .then((knex) => {
      
              SCli.debug(__MODULE_NAME, 'Knex initted');
      
              return Schema
      Severity: Major
      Found in modules/core/server/models/knex.js - About 2 days to fix

        Function exports has a Cognitive Complexity of 112 (exceeds 5 allowed). Consider refactoring.
        Open

            .then((knex) => {
                return knex
                    .schema
                    .dropTableIfExists('objection')
                    .then(() => {
        Severity: Minor
        Found in modules/core/server/models/objection/index.js - About 2 days to fix

        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';
        
        
        Severity: Major
        Found in modules/core/server/models/user/index.js - About 2 days to fix

          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 {
          Severity: Major
          Found in modules/core/server/models/content/index.js - About 1 day to fix

            Function exports has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring.
            Open

                .then((Taggable, Role, knex) => {
            
                    SCli.debug(__MODULE_NAME, 'READY');
            
                    /**
            Severity: Minor
            Found in modules/core/server/models/user/index.js - About 1 day to fix

            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) {
            Severity: Major
            Found in modules/cms/server/controllers/page.js - About 1 day to fix

              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
              Severity: Major
              Found in modules/cms/client/js/manager/structure.ui.js - About 1 day to fix

                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 {
                Severity: Major
                Found in modules/core/server/models/media/index.js - About 1 day to fix

                  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;
                  Severity: Minor
                  Found in lib/server/init/format.js - About 1 day to fix

                  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
                  Severity: Major
                  Found in modules/core/client/js/table.js - About 1 day to fix

                    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';
                    
                    
                    Severity: Major
                    Found in modules/core/server/models/objection/index.js - About 1 day to fix

                      Function exports has 271 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          .then((Taggable, TaxonomyType) => {
                      
                              SCli.debug(__MODULE_NAME, 'READY');
                      
                              /**
                      Severity: Major
                      Found in modules/core/server/models/template/index.js - About 1 day to fix

                        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));
                        
                        
                        Severity: Minor
                        Found in modules/cms/server/lib/dust/media.js - About 1 day to fix

                        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() {
                        Severity: Minor
                        Found in modules/core/server/models/content/querybuilder.js - About 1 day to fix

                        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 = {};
                        Severity: Major
                        Found in modules/users/server/controllers/account.js - About 1 day to fix

                          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);
                          Severity: Major
                          Found in modules/cms/server/controllers/content.js - About 1 day to fix

                            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 {
                            Severity: Minor
                            Found in modules/core/server/models/content/index.js - About 1 day to fix

                            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';
                            
                            
                            Severity: Major
                            Found in modules/core/server/models/knex.js - About 1 day to fix
                              Severity
                              Category
                              Status
                              Source
                              Language