jmdobry/reheat

View on GitHub

Showing 296 of 296 total issues

Function options has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    options: function (test) {
        test.expect(6);

        var instance = {
            attributes: {
Severity: Minor
Found in old_test/reheat/model/prototype/clear.test.js - About 1 hr to fix

    Function options has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        options: function (test) {
            test.expect(8);
    
            function Model(attrs) {
                this.attributes = attrs;
    Severity: Minor
    Found in old_test/reheat/model/static/filter.test.js - About 1 hr to fix

      Function options has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          options: function (test) {
              test.expect(6);
      
              var instance = {
                  attributes: {
      Severity: Minor
      Found in old_test/reheat/model/prototype/unset.test.js - About 1 hr to fix

        Function whereError has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            whereError: function (test) {
                test.expect(10);
        
                function Model(attrs) {
                    this.attributes = attrs;
        Severity: Minor
        Found in old_test/reheat/model/static/filter.test.js - About 1 hr to fix

          Function predicate has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              predicate: function (test) {
                  test.expect(10);
          
                  function Model(attrs) {
                      this.attributes = attrs;
          Severity: Minor
          Found in old_test/reheat/model/static/filter.test.js - About 1 hr to fix

            Function skipError has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                skipError: function (test) {
                    test.expect(8);
            
                    function Model(attrs) {
                        this.attributes = attrs;
            Severity: Minor
            Found in old_test/reheat/model/static/filter.test.js - About 1 hr to fix

              Function nestedObject has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  nestedObject: function (test) {
                      test.expect(3);
              
                      var instance = {
                          attributes: {
              Severity: Minor
              Found in old_test/reheat/model/prototype/set.test.js - About 1 hr to fix

                Function pluckError has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    pluckError: function (test) {
                        test.expect(10);
                
                        function Model(attrs) {
                            this.attributes = attrs;
                Severity: Minor
                Found in old_test/reheat/model/static/filter.test.js - About 1 hr to fix

                  Function limitError has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      limitError: function (test) {
                          test.expect(8);
                  
                          function Model(attrs) {
                              this.attributes = attrs;
                  Severity: Minor
                  Found in old_test/reheat/model/static/filter.test.js - About 1 hr to fix

                    Function key has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        key: function (test) {
                            test.expect(12);
                    
                            var instance = {
                                attributes: {
                    Severity: Minor
                    Found in old_test/reheat/model/prototype/set.test.js - About 1 hr to fix

                      Function options has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          options: function (test) {
                              test.expect(6);
                      
                              var instance = {
                                  attributes: {
                      Severity: Minor
                      Found in old_test/reheat/model/prototype/set.test.js - About 1 hr to fix

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                                if (err) {
                                  this.validationError = new ValidationError(errorPrefix + 'key/value: Validation failed!', err);
                                  throw this.validationError;
                                } else {
                                  if (utils.isObject(key)) {
                        Severity: Major
                        Found in lib/model/prototype/setSync.js and 1 other location - About 1 hr to fix
                        lib/model/prototype/setSync.js on lines 85..110

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 56.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                                    instance.save().then(function (instance) {
                                        test.deepEqual(instance.attributes, {
                                            name: 'John'
                                        });
                                        test.done();
                        Severity: Major
                        Found in old_test/reheat/model/prototype/save.test.js and 1 other location - About 1 hr to fix
                        old_test/reheat/model/prototype/destroy.test.js on lines 146..151

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 56.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                                    instance.destroy().then(function (instance) {
                                        test.deepEqual(instance.attributes, {
                                            name: 'John'
                                        });
                                        test.done();
                        Severity: Major
                        Found in old_test/reheat/model/prototype/destroy.test.js and 1 other location - About 1 hr to fix
                        old_test/reheat/model/prototype/save.test.js on lines 106..111

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 56.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Identical blocks of code found in 2 locations. Consider refactoring.
                        Open

                              if (options.validate && this.constructor.schema) {
                                var clone = utils.clone(this.attributes);
                                if (utils.isObject(key)) {
                                  utils.deepMixIn(clone, key);
                                } else {
                        Severity: Major
                        Found in lib/model/prototype/setSync.js and 1 other location - About 1 hr to fix
                        lib/model/prototype/setSync.js on lines 94..103

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 56.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Function nested has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            nested: function (test) {
                                test.expect(4);
                        
                                var instance = {
                                    attributes: {
                        Severity: Minor
                        Found in old_test/reheat/model/prototype/unset.test.js - About 1 hr to fix

                          Function primaryKey has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              primaryKey: function (test) {
                                  test.expect(18);
                          
                                  function Model(attrs) {
                                      this.attributes = attrs;
                          Severity: Minor
                          Found in old_test/reheat/model/static/get.test.js - About 1 hr to fix

                            Function options has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                options: function (test) {
                                    test.expect(8);
                            
                                    function Model(attrs) {
                                        this.attributes = attrs;
                            Severity: Minor
                            Found in old_test/reheat/model/static/getAll.test.js - About 1 hr to fix

                              Function test1 has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      test1: function (test) {
                                          var _this = this;
                                          test.expect(8);
                              
                                          var queue = [];
                              Severity: Minor
                              Found in old_test/reheat/connection/index.test.js - About 1 hr to fix

                                Function run has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  Connection.prototype.run = function (query, options, cb) {
                                    if (utils.isFunction(options)) {
                                      cb = options;
                                      options = {};
                                    }
                                Severity: Minor
                                Found in lib/connection/index.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language