540co/ads-bpa

View on GitHub

Showing 168 of 168 total issues

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

    describe('POST /reactions /definition (reaction = foobarfoobar | definition = foobar) - Reaction not found / does not exist', function(){

      it('respond with HTTP STATUS CODE 404', function(done){
        request(app)
          .post(baseUrl + '/reactions/foobarfoobar/definitions')
Severity: Major
Found in server/test/routes.js and 15 other locations - About 3 hrs to fix
server/test/routes.js on lines 249..263
server/test/routes.js on lines 265..279
server/test/routes.js on lines 281..295
server/test/routes.js on lines 297..311
server/test/routes.js on lines 313..327
server/test/routes.js on lines 329..343
server/test/routes.js on lines 345..359
server/test/routes.js on lines 361..375
server/test/routes.js on lines 377..391
server/test/routes.js on lines 393..407
server/test/routes.js on lines 409..423
server/test/routes.js on lines 425..439
server/test/routes.js on lines 441..455
server/test/routes.js on lines 457..471
server/test/routes.js on lines 473..487

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 103.

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

  describe('Method: search', function() {

    it('should have function named $scope.search()', function () {
      expect(angular.isFunction($scope.search)).toBe(true);
    });
Severity: Major
Found in client/test/spec/controllers/splash.js and 1 other location - About 3 hrs to fix
client/test/spec/controllers/main.js on lines 206..217

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 100.

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

  describe('Method: search', function() {

    it('should have function named $scope.search()', function () {
      expect(angular.isFunction($scope.search)).toBe(true);
    });
Severity: Major
Found in client/test/spec/controllers/main.js and 1 other location - About 3 hrs to fix
client/test/spec/controllers/splash.js on lines 79..90

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 100.

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 3 locations. Consider refactoring.
Open

  describe('Method: Post Symptom Definition to Reactions API', function() {
    it('reactions.postSymptomDefinition() should be a function', function() {
      expect(angular.isFunction(reactions.reactions.postSymptomDefinition)).toBe(true);
    });

Severity: Major
Found in client/test/spec/services/reactions.js and 2 other locations - About 3 hrs to fix
client/test/spec/services/reactions.js on lines 51..59
client/test/spec/services/reactions.js on lines 61..69

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 96.

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 3 locations. Consider refactoring.
Open

  describe('Method: Post Search Terms to Reactions API', function() {
    it('reactions.postSearchTerm() should be a function', function() {
      expect(angular.isFunction(reactions.reactions.postSearchTerm)).toBe(true);
    });

Severity: Major
Found in client/test/spec/services/reactions.js and 2 other locations - About 3 hrs to fix
client/test/spec/services/reactions.js on lines 31..39
client/test/spec/services/reactions.js on lines 61..69

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 96.

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 3 locations. Consider refactoring.
Open

  describe('Method: Post New Symptom Definition to Reactions API', function() {
    it('reactions.postNewDefinition() should be a function', function() {
      expect(angular.isFunction(reactions.reactions.postNewDefinition)).toBe(true);
    });

Severity: Major
Found in client/test/spec/services/reactions.js and 2 other locations - About 3 hrs to fix
client/test/spec/services/reactions.js on lines 31..39
client/test/spec/services/reactions.js on lines 51..59

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 96.

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 15 locations. Consider refactoring.
Open

    describe('GET /reactions (list) - offset = -999', function(){

      it('respond with HTTP STATUS CODE 404', function(done){
        request(app)
          .get(baseUrl + '/reactions?offset=-999')
Severity: Major
Found in server/test/routes.js and 14 other locations - About 3 hrs to fix
server/test/routes.js on lines 161..172
server/test/routes.js on lines 174..187
server/test/routes.js on lines 204..217
server/test/routes.js on lines 219..232
server/test/routes.js on lines 234..247
server/test/routes.js on lines 505..518
server/test/routes.js on lines 520..533
server/test/routes.js on lines 535..548
server/test/routes.js on lines 550..563
server/test/routes.js on lines 565..578
server/test/routes.js on lines 580..593
server/test/routes.js on lines 595..608
server/test/routes.js on lines 610..623
server/test/routes.js on lines 625..638

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 95.

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 15 locations. Consider refactoring.
Open

    describe('GET /swagger', function(){
      it('responds with HTTP STATUS CODE 200', function(done){
        request(app)
          .get(baseUrl + '/swagger')
          .set('Accept', 'application/json')
Severity: Major
Found in server/test/routes.js and 14 other locations - About 3 hrs to fix
server/test/routes.js on lines 174..187
server/test/routes.js on lines 189..202
server/test/routes.js on lines 204..217
server/test/routes.js on lines 219..232
server/test/routes.js on lines 234..247
server/test/routes.js on lines 505..518
server/test/routes.js on lines 520..533
server/test/routes.js on lines 535..548
server/test/routes.js on lines 550..563
server/test/routes.js on lines 565..578
server/test/routes.js on lines 580..593
server/test/routes.js on lines 595..608
server/test/routes.js on lines 610..623
server/test/routes.js on lines 625..638

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 95.

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 15 locations. Consider refactoring.
Open

    describe('GET /reactions (list) - limit = 1', function(){

      it('respond with HTTP STATUS CODE 200', function(done){
        request(app)
          .get(baseUrl + '/reactions?limit=1')
Severity: Major
Found in server/test/routes.js and 14 other locations - About 3 hrs to fix
server/test/routes.js on lines 161..172
server/test/routes.js on lines 174..187
server/test/routes.js on lines 189..202
server/test/routes.js on lines 219..232
server/test/routes.js on lines 234..247
server/test/routes.js on lines 505..518
server/test/routes.js on lines 520..533
server/test/routes.js on lines 535..548
server/test/routes.js on lines 550..563
server/test/routes.js on lines 565..578
server/test/routes.js on lines 580..593
server/test/routes.js on lines 595..608
server/test/routes.js on lines 610..623
server/test/routes.js on lines 625..638

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 95.

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 15 locations. Consider refactoring.
Open

    describe('GET /reactions (reaction = foo) - Does not exist', function(){

      it('respond with HTTP STATUS CODE 404', function(done){
        request(app)
          .get(baseUrl + '/reactions/foo')
Severity: Major
Found in server/test/routes.js and 14 other locations - About 3 hrs to fix
server/test/routes.js on lines 161..172
server/test/routes.js on lines 174..187
server/test/routes.js on lines 189..202
server/test/routes.js on lines 204..217
server/test/routes.js on lines 219..232
server/test/routes.js on lines 234..247
server/test/routes.js on lines 505..518
server/test/routes.js on lines 535..548
server/test/routes.js on lines 550..563
server/test/routes.js on lines 565..578
server/test/routes.js on lines 580..593
server/test/routes.js on lines 595..608
server/test/routes.js on lines 610..623
server/test/routes.js on lines 625..638

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 95.

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 15 locations. Consider refactoring.
Open

    describe('GET /searches (list) - limit > 200', function(){

      it('respond with HTTP STATUS CODE 200', function(done){
        request(app)
          .get(baseUrl + '/searches?limit=999')
Severity: Major
Found in server/test/routes.js and 14 other locations - About 3 hrs to fix
server/test/routes.js on lines 161..172
server/test/routes.js on lines 174..187
server/test/routes.js on lines 189..202
server/test/routes.js on lines 204..217
server/test/routes.js on lines 219..232
server/test/routes.js on lines 234..247
server/test/routes.js on lines 505..518
server/test/routes.js on lines 520..533
server/test/routes.js on lines 535..548
server/test/routes.js on lines 550..563
server/test/routes.js on lines 565..578
server/test/routes.js on lines 580..593
server/test/routes.js on lines 595..608
server/test/routes.js on lines 625..638

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 95.

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 15 locations. Consider refactoring.
Open

    describe('GET /reactions (list) - limit > 200', function(){

      it('respond with HTTP STATUS CODE 200', function(done){
        request(app)
          .get(baseUrl + '/reactions?limit=1000')
Severity: Major
Found in server/test/routes.js and 14 other locations - About 3 hrs to fix
server/test/routes.js on lines 161..172
server/test/routes.js on lines 174..187
server/test/routes.js on lines 189..202
server/test/routes.js on lines 204..217
server/test/routes.js on lines 219..232
server/test/routes.js on lines 505..518
server/test/routes.js on lines 520..533
server/test/routes.js on lines 535..548
server/test/routes.js on lines 550..563
server/test/routes.js on lines 565..578
server/test/routes.js on lines 580..593
server/test/routes.js on lines 595..608
server/test/routes.js on lines 610..623
server/test/routes.js on lines 625..638

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 95.

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 15 locations. Consider refactoring.
Open

    describe('DELETE /reactions (reaction = foo) - Reaction not found', function(){

      it('respond with HTTP STATUS CODE 404', function(done){
        request(app)
          .delete(baseUrl + '/reactions/foo')
Severity: Major
Found in server/test/routes.js and 14 other locations - About 3 hrs to fix
server/test/routes.js on lines 161..172
server/test/routes.js on lines 174..187
server/test/routes.js on lines 189..202
server/test/routes.js on lines 204..217
server/test/routes.js on lines 219..232
server/test/routes.js on lines 234..247
server/test/routes.js on lines 505..518
server/test/routes.js on lines 520..533
server/test/routes.js on lines 535..548
server/test/routes.js on lines 565..578
server/test/routes.js on lines 580..593
server/test/routes.js on lines 595..608
server/test/routes.js on lines 610..623
server/test/routes.js on lines 625..638

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 95.

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 15 locations. Consider refactoring.
Open

    describe('GET /searches (list) - offset = 1', function(){

      it('respond with HTTP STATUS CODE 200', function(done){
        request(app)
          .get(baseUrl + '/searches?offset=1')
Severity: Major
Found in server/test/routes.js and 14 other locations - About 3 hrs to fix
server/test/routes.js on lines 161..172
server/test/routes.js on lines 174..187
server/test/routes.js on lines 189..202
server/test/routes.js on lines 204..217
server/test/routes.js on lines 219..232
server/test/routes.js on lines 234..247
server/test/routes.js on lines 505..518
server/test/routes.js on lines 520..533
server/test/routes.js on lines 535..548
server/test/routes.js on lines 550..563
server/test/routes.js on lines 565..578
server/test/routes.js on lines 580..593
server/test/routes.js on lines 595..608
server/test/routes.js on lines 610..623

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 95.

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 15 locations. Consider refactoring.
Open

    describe('DELETE /reactions (reaction = bogus) - Postive Test', function(){

      it('respond with HTTP STATUS CODE 204', function(done){
        request(app)
          .delete(baseUrl + '/reactions/bogus')
Severity: Major
Found in server/test/routes.js and 14 other locations - About 3 hrs to fix
server/test/routes.js on lines 161..172
server/test/routes.js on lines 174..187
server/test/routes.js on lines 189..202
server/test/routes.js on lines 204..217
server/test/routes.js on lines 219..232
server/test/routes.js on lines 234..247
server/test/routes.js on lines 505..518
server/test/routes.js on lines 520..533
server/test/routes.js on lines 550..563
server/test/routes.js on lines 565..578
server/test/routes.js on lines 580..593
server/test/routes.js on lines 595..608
server/test/routes.js on lines 610..623
server/test/routes.js on lines 625..638

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 95.

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 15 locations. Consider refactoring.
Open

    describe('GET /reactions (reaction = bogus) - Postive Test', function(){

      it('respond with HTTP STATUS CODE 200', function(done){
        request(app)
          .get(baseUrl + '/reactions/bogus')
Severity: Major
Found in server/test/routes.js and 14 other locations - About 3 hrs to fix
server/test/routes.js on lines 161..172
server/test/routes.js on lines 174..187
server/test/routes.js on lines 189..202
server/test/routes.js on lines 204..217
server/test/routes.js on lines 219..232
server/test/routes.js on lines 234..247
server/test/routes.js on lines 520..533
server/test/routes.js on lines 535..548
server/test/routes.js on lines 550..563
server/test/routes.js on lines 565..578
server/test/routes.js on lines 580..593
server/test/routes.js on lines 595..608
server/test/routes.js on lines 610..623
server/test/routes.js on lines 625..638

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 95.

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 15 locations. Consider refactoring.
Open

    describe('GET /searches (list) - limit < 1', function(){

      it('respond with HTTP STATUS CODE 200', function(done){
        request(app)
          .get(baseUrl + '/searches?limit=-999')
Severity: Major
Found in server/test/routes.js and 14 other locations - About 3 hrs to fix
server/test/routes.js on lines 161..172
server/test/routes.js on lines 174..187
server/test/routes.js on lines 189..202
server/test/routes.js on lines 204..217
server/test/routes.js on lines 219..232
server/test/routes.js on lines 234..247
server/test/routes.js on lines 505..518
server/test/routes.js on lines 520..533
server/test/routes.js on lines 535..548
server/test/routes.js on lines 550..563
server/test/routes.js on lines 565..578
server/test/routes.js on lines 595..608
server/test/routes.js on lines 610..623
server/test/routes.js on lines 625..638

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 95.

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 15 locations. Consider refactoring.
Open

    describe('GET /reactions (list) - limit = -1', function(){

      it('respond with HTTP STATUS CODE 200', function(done){
        request(app)
          .get(baseUrl + '/reactions?limit=-1')
Severity: Major
Found in server/test/routes.js and 14 other locations - About 3 hrs to fix
server/test/routes.js on lines 161..172
server/test/routes.js on lines 174..187
server/test/routes.js on lines 189..202
server/test/routes.js on lines 204..217
server/test/routes.js on lines 234..247
server/test/routes.js on lines 505..518
server/test/routes.js on lines 520..533
server/test/routes.js on lines 535..548
server/test/routes.js on lines 550..563
server/test/routes.js on lines 565..578
server/test/routes.js on lines 580..593
server/test/routes.js on lines 595..608
server/test/routes.js on lines 610..623
server/test/routes.js on lines 625..638

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 95.

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 15 locations. Consider refactoring.
Open

    describe('GET /searches (list) - offset < 1', function(){

      it('respond with HTTP STATUS CODE 404', function(done){
        request(app)
          .get(baseUrl + '/searches?offset=-999')
Severity: Major
Found in server/test/routes.js and 14 other locations - About 3 hrs to fix
server/test/routes.js on lines 161..172
server/test/routes.js on lines 174..187
server/test/routes.js on lines 189..202
server/test/routes.js on lines 204..217
server/test/routes.js on lines 219..232
server/test/routes.js on lines 234..247
server/test/routes.js on lines 505..518
server/test/routes.js on lines 520..533
server/test/routes.js on lines 535..548
server/test/routes.js on lines 550..563
server/test/routes.js on lines 565..578
server/test/routes.js on lines 580..593
server/test/routes.js on lines 610..623
server/test/routes.js on lines 625..638

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 95.

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 15 locations. Consider refactoring.
Open

    describe('GET /reactions (list) - no limit or offset', function(){

      it('respond with HTTP STATUS CODE 200', function(done){
        request(app)
          .get(baseUrl + '/reactions')
Severity: Major
Found in server/test/routes.js and 14 other locations - About 3 hrs to fix
server/test/routes.js on lines 161..172
server/test/routes.js on lines 189..202
server/test/routes.js on lines 204..217
server/test/routes.js on lines 219..232
server/test/routes.js on lines 234..247
server/test/routes.js on lines 505..518
server/test/routes.js on lines 520..533
server/test/routes.js on lines 535..548
server/test/routes.js on lines 550..563
server/test/routes.js on lines 565..578
server/test/routes.js on lines 580..593
server/test/routes.js on lines 595..608
server/test/routes.js on lines 610..623
server/test/routes.js on lines 625..638

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 95.

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

Severity
Category
Status
Source
Language