jmdobry/reheat

View on GitHub

Showing 125 of 296 total issues

Function relations has 373 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    relations: function (test) {
        var user = new User({
                name: 'John Anderson'
            }),
            user2 = new User({
Severity: Major
Found in old_test/model/static/relations.test.js - About 1 day to fix

    File index.test.js has 715 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*jshint loopfunc:true*/
    
    var errors = require('../../../../build/instrument/lib/support/errors'),
        SandboxedModule = require('sandboxed-module'),
        Connection = SandboxedModule.require('../../../../build/instrument/lib/connection', {
    Severity: Major
    Found in old_test/reheat/connection/index.test.js - About 1 day to fix

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

      module.exports = function (grunt) {
      
          require('jit-grunt')(grunt, {
          simplemocha: 'grunt-simple-mocha'
        });
      Severity: Major
      Found in Gruntfile.js - About 1 day to fix

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

        module.exports = function (container, Promise, utils, errors) {
        
          var errorPrefix = 'Collection.findAll(predicate[, options][, cb]): ';
          var IllegalArgumentError = errors.IllegalArgumentError;
          var RuntimeError = errors.RuntimeError;
        Severity: Major
        Found in lib/collection/static/findAll.js - About 1 day to fix

          File relations.test.js has 490 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /*jshint loopfunc:true*/
          
          var Connection = require('../../../../build/instrument/lib/connection'),
              reheat = require('../../../../build/instrument/lib'),
              utils = require('../../../../build/instrument/lib/support/utils'),
          Severity: Minor
          Found in old_test/model/static/relations.test.js - About 7 hrs to fix

            File filter.test.js has 478 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /*jshint loopfunc:true*/
            
            var filter = require('../../../../../build/instrument/lib/model/static/filter'),
                errors = require('../../../../../build/instrument/lib/support/errors'),
                support = require('../../../../support/support'),
            Severity: Minor
            Found in old_test/reheat/model/static/filter.test.js - About 7 hrs to fix

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

              module.exports = function (container, Promise, utils, errors) {
              
                var errorPrefix = 'Collection.findAll(predicate[, options][, cb]): ';
                var IllegalArgumentError = errors.IllegalArgumentError;
                var RuntimeError = errors.RuntimeError;
              Severity: Minor
              Found in lib/collection/static/findAll.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 relations has 154 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  relations: function (test) {
                      var user = new User({
                              name: 'John Anderson'
                          }),
                          user2 = new User({
              Severity: Major
              Found in old_test/model/static/filter.relations.test.js - About 6 hrs to fix

                Function _findAll has 147 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function _findAll(predicate, options) {
                    var Collection = this;
                    var models = container.get('models');
                    var Model;
                
                
                Severity: Major
                Found in lib/collection/static/findAll.js - About 5 hrs to fix

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

                  module.exports = function (container, Promise, utils, errors) {
                    var errorPrefix = 'Collection.getAll(keys, index[, options][, cb]): ';
                    var IllegalArgumentError = errors.IllegalArgumentError;
                    var RuntimeError = errors.RuntimeError;
                  
                  
                  Severity: Major
                  Found in lib/collection/static/getAll.js - About 5 hrs to fix

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

                    module.exports = function (utils, errors) {
                      var IllegalArgumentError = errors.IllegalArgumentError,
                        ValidationError = errors.ValidationError,
                        UnhandledError = errors.UnhandledError;
                    
                    
                    Severity: Minor
                    Found in lib/model/prototype/setSync.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 exports has 140 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    module.exports = function (Promise, utils, errors, models) {
                      /**
                       * @doc method
                       * @id Model.instance_methods:save
                       * @name save
                    Severity: Major
                    Found in lib/model/prototype/save.js - About 5 hrs to fix

                      Function getAll has 140 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function getAll(keys, index, options, cb) {
                          var Collection = this;
                          var models = container.get('models');
                          var Model;
                      
                      
                      Severity: Major
                      Found in lib/collection/static/getAll.js - About 5 hrs to fix

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

                        module.exports = function (Collection_save, utils, errors, Promise) {
                        
                          var protoProps = {
                        
                            /**
                        Severity: Major
                        Found in lib/collection/prototype/index.js - About 5 hrs to fix

                          Function save has 137 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            function save(options, cb) {
                              var relationsToMerge = {};
                              var childRelations = {};
                              var Model = this.constructor;
                          
                          
                          Severity: Major
                          Found in lib/model/prototype/save.js - About 5 hrs to fix

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

                            module.exports = function (container, Promise, utils, errors) {
                              /**
                               * @doc method
                               * @id Model.static_methods:findOne
                               * @name findOne
                            Severity: Major
                            Found in lib/model/static/findOne.js - About 5 hrs to fix

                              Function findOne has 130 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                function findOne(primaryKey, options, cb) {
                                  var models = container.get('models');
                                  var newModels = {};
                                  var merge = {};
                                  var query;
                              Severity: Major
                              Found in lib/model/static/findOne.js - About 5 hrs to fix

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

                                module.exports = function (container, Promise, utils, errors) {
                                  var IllegalArgumentError = errors.IllegalArgumentError;
                                  var RuntimeError = errors.RuntimeError;
                                  var errorPrefix = 'Model.load(relations[, options][, cb]): ';
                                
                                
                                Severity: Major
                                Found in lib/model/prototype/load.js - About 5 hrs to fix

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

                                  module.exports = function (Promise, utils, errors) {
                                    var IllegalArgumentError = errors.IllegalArgumentError;
                                  
                                    /**
                                     * @doc method
                                  Severity: Minor
                                  Found in lib/model/prototype/set.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 exports has 125 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  module.exports = function (utils, errors, Model_set, Model_setSync, Model_unset, Model_clear, Model_save, Model_destroy, Model_load) {
                                  
                                    return {
                                  
                                      /**
                                  Severity: Major
                                  Found in lib/model/prototype/index.js - About 5 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language