Showing 136 of 152 total issues

Function exec has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring.
Open

exports.exec = function(settings, registry, callback) {

    'use strict';

    return new Promise(function(resolve, reject) {
Severity: Minor
Found in lib/output/uploadExportFiles.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 convertSchemaToTable has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring.
Open

exports.convertSchemaToTable = function(schema, modelType) {
    'use strict';

    var html = '';

Severity: Minor
Found in lib/util/documentation.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 validateExpandedRegistry has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring.
Open

exports.validateExpandedRegistry = function(registry) {
    'use strict';

    return new Promise(function(resolve) {

Severity: Minor
Found in lib/util/validate.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 exec has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
Open

exports.exec = function(settings, registry) {
    'use strict';

    exports.outlineTemplate = moboUtil.loadTemplate(exports, 'outline.wikitext', settings);

Severity: Minor
Found in lib/modelToText/generateOutline.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 analyzeModels has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
Open

exports.analyzeModels = function(models, fields) {
    'use strict';

    var model;
    var modelPageName;
Severity: Minor
Found in lib/modelToText/generateGraph.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 enhanceWithForm has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
Open

exports.enhanceWithForm = function(objCollection, formSchema) {

    if (formSchema && formSchema.$path) {

        var newCollection = [];
Severity: Minor
Found in lib/modules/importHelper.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 generateTemplateData has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
Open

exports.generateTemplateData = function(obj) {
    'use strict';

    var templateData = {};

Severity: Minor
Found in lib/modelToText/transformModel.js - About 7 hrs 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 exec has 163 lines of code (exceeds 25 allowed). Consider refactoring.
Open

exports.exec = function(settings, registry, callback) {

    'use strict';

    return new Promise(function(resolve, reject) {
Severity: Major
Found in lib/output/uploadExportFiles.js - About 6 hrs to fix

    Function extend has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
    Open

    exports.extend = function(obj, $extend, registry) {
        'use strict';
    
        var ref = $extend || obj.$extend || false;
    
    
    Severity: Minor
    Found in lib/modelToModel/intermediaryLayer.js - About 5 hrs 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 drilldownInfo has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
    Open

    exports.drilldownInfo = function(obj, registry) {
    
        var drilldowninfo = [];
        var fieldName;
        var field;
    Severity: Minor
    Found in lib/modelToText/transformModel.js - About 5 hrs 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 printProperty has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
    Open

    exports.printProperty = function(attr) {
        'use strict';
    
        var result = '';
        var inspect = attr.items || attr;
    Severity: Minor
    Found in lib/util/handlebarsExtended.js - About 5 hrs 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 exec has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
    Open

    exports.exec = function(settings, registry) {
        'use strict';
    
        return new Promise(function(resolve) {
    
    
    Severity: Minor
    Found in lib/modelToText/generateWikiStructure.js - About 5 hrs 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 prePostFix has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
    Open

    exports.prePostFix = function(mode, model, registry) {
    
        var wikitext = '';
    
        if (model.items) {
    Severity: Minor
    Found in lib/util/moboUtil.js - About 4 hrs 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 generateForm has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
    Open

    exports.generateForm = function(settings, obj, name, registry) {
        'use strict';
    
        //////////////////////////////////////////
        // GENERAL FORM ATTRIBUTES              //
    Severity: Minor
    Found in lib/modelToText/transformForm.js - About 4 hrs 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 exec has 107 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    exports.exec = function(settings, onGenerated, callback) {
        'use strict';
    
        if (exports.running === true) {
            log('[W] mobo is currently running, skipping execution');
    Severity: Major
    Found in lib/mobo.js - About 4 hrs to fix

      Function analyzeForms has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
      Open

      exports.analyzeForms = function(forms) {
          'use strict';
      
          for (var formName in forms) {
      
      
      Severity: Minor
      Found in lib/modelToText/generateGraph.js - About 4 hrs 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 applyImplicit has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
      Open

      exports.applyImplicit = function(obj) {
      
          'use strict';
      
          var inspect = obj.items || obj;
      Severity: Minor
      Found in lib/modelToModel/compatibilityLayer.js - About 4 hrs 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 convertSchemaToTable has 97 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      exports.convertSchemaToTable = function(schema, modelType) {
          'use strict';
      
          var html = '';
      
      
      Severity: Major
      Found in lib/util/documentation.js - About 3 hrs to fix

        Function mergeObjects has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
        Open

        exports.mergeObjects = function(obj1, obj2) {
            return _.merge(obj1, obj2, function(objectValue, sourceValue, key) {
        
                if (_.isArray(objectValue)) {
        
        
        Severity: Minor
        Found in lib/modelToModel/intermediaryLayer.js - About 3 hrs 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 analyzeModels has 83 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        exports.analyzeModels = function(models, fields) {
            'use strict';
        
            var model;
            var modelPageName;
        Severity: Major
        Found in lib/modelToText/generateGraph.js - About 3 hrs to fix
          Severity
          Category
          Status
          Source
          Language