Showing 313 of 321 total issues

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

        describe('financial-april', () => {
            beforeEach(() => {
                jest.spyOn(
                    financialapril,
                    'generateFinancialAprilPeriodsUpToYear'
Severity: Major
Found in src/period/generators/__tests__/index.spec.js and 4 other locations - About 1 day to fix
src/period/generators/__tests__/index.spec.js on lines 288..325
src/period/generators/__tests__/index.spec.js on lines 327..364
src/period/generators/__tests__/index.spec.js on lines 366..410
src/period/generators/__tests__/index.spec.js on lines 412..456

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

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

        describe('financial-october', () => {
            beforeEach(() => {
                jest.spyOn(
                    financialoctober,
                    'generateFinancialOctoberPeriodsUpToYear'
Severity: Major
Found in src/period/generators/__tests__/index.spec.js and 4 other locations - About 1 day to fix
src/period/generators/__tests__/index.spec.js on lines 288..325
src/period/generators/__tests__/index.spec.js on lines 327..364
src/period/generators/__tests__/index.spec.js on lines 412..456
src/period/generators/__tests__/index.spec.js on lines 458..502

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

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

        describe('yearly', () => {
            beforeEach(() => {
                jest.spyOn(yearly, 'generateYearlyPeriodsUpToYear')
            })

Severity: Major
Found in src/period/generators/__tests__/index.spec.js and 4 other locations - About 1 day to fix
src/period/generators/__tests__/index.spec.js on lines 327..364
src/period/generators/__tests__/index.spec.js on lines 366..410
src/period/generators/__tests__/index.spec.js on lines 412..456
src/period/generators/__tests__/index.spec.js on lines 458..502

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

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

File System.spec.js has 560 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import fixtures from '../../__fixtures__/fixtures'
import MockApi from '../../api/Api'
import System from '../System'
import SystemConfiguration from '../SystemConfiguration'
import SystemSettings from '../SystemSettings'
Severity: Major
Found in src/system/__tests__/System.spec.js - About 1 day to fix

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

            describe('quarterly', () => {
                beforeEach(() => {
                    jest.spyOn(quarterly, 'generateQuarterlyPeriodsForYear')
                })
    
    
    Severity: Major
    Found in src/period/generators/__tests__/index.spec.js and 6 other locations - About 1 day to fix
    src/period/generators/__tests__/index.spec.js on lines 16..52
    src/period/generators/__tests__/index.spec.js on lines 54..90
    src/period/generators/__tests__/index.spec.js on lines 92..128
    src/period/generators/__tests__/index.spec.js on lines 130..165
    src/period/generators/__tests__/index.spec.js on lines 204..241
    src/period/generators/__tests__/index.spec.js on lines 243..286

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

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

            describe('bi-monthly', () => {
                beforeEach(() => {
                    jest.spyOn(bimonthly, 'generateBiMonthlyPeriodsForYear')
                })
    
    
    Severity: Major
    Found in src/period/generators/__tests__/index.spec.js and 6 other locations - About 1 day to fix
    src/period/generators/__tests__/index.spec.js on lines 16..52
    src/period/generators/__tests__/index.spec.js on lines 54..90
    src/period/generators/__tests__/index.spec.js on lines 92..128
    src/period/generators/__tests__/index.spec.js on lines 167..202
    src/period/generators/__tests__/index.spec.js on lines 204..241
    src/period/generators/__tests__/index.spec.js on lines 243..286

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

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

            describe('monthly', () => {
                beforeEach(() => {
                    jest.spyOn(monthly, 'generateMonthlyPeriodsForYear')
                })
    
    
    Severity: Major
    Found in src/period/generators/__tests__/index.spec.js and 6 other locations - About 1 day to fix
    src/period/generators/__tests__/index.spec.js on lines 16..52
    src/period/generators/__tests__/index.spec.js on lines 54..90
    src/period/generators/__tests__/index.spec.js on lines 130..165
    src/period/generators/__tests__/index.spec.js on lines 167..202
    src/period/generators/__tests__/index.spec.js on lines 204..241
    src/period/generators/__tests__/index.spec.js on lines 243..286

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

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

            describe('six-monthly', () => {
                beforeEach(() => {
                    jest.spyOn(sixmonthly, 'generateSixMonthlyPeriodsForYear')
                })
    
    
    Severity: Major
    Found in src/period/generators/__tests__/index.spec.js and 6 other locations - About 1 day to fix
    src/period/generators/__tests__/index.spec.js on lines 16..52
    src/period/generators/__tests__/index.spec.js on lines 54..90
    src/period/generators/__tests__/index.spec.js on lines 92..128
    src/period/generators/__tests__/index.spec.js on lines 130..165
    src/period/generators/__tests__/index.spec.js on lines 167..202
    src/period/generators/__tests__/index.spec.js on lines 243..286

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

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

            describe('daily', () => {
                beforeEach(() => {
                    jest.spyOn(daily, 'generateDailyPeriodsForYear')
                })
    
    
    Severity: Major
    Found in src/period/generators/__tests__/index.spec.js and 6 other locations - About 1 day to fix
    src/period/generators/__tests__/index.spec.js on lines 54..90
    src/period/generators/__tests__/index.spec.js on lines 92..128
    src/period/generators/__tests__/index.spec.js on lines 130..165
    src/period/generators/__tests__/index.spec.js on lines 167..202
    src/period/generators/__tests__/index.spec.js on lines 204..241
    src/period/generators/__tests__/index.spec.js on lines 243..286

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

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

            describe('six-monthly-april', () => {
                beforeEach(() => {
                    jest.spyOn(
                        sixmonthlyapril,
                        'generateSixMonthlyAprilPeriodsForYear'
    Severity: Major
    Found in src/period/generators/__tests__/index.spec.js and 6 other locations - About 1 day to fix
    src/period/generators/__tests__/index.spec.js on lines 16..52
    src/period/generators/__tests__/index.spec.js on lines 54..90
    src/period/generators/__tests__/index.spec.js on lines 92..128
    src/period/generators/__tests__/index.spec.js on lines 130..165
    src/period/generators/__tests__/index.spec.js on lines 167..202
    src/period/generators/__tests__/index.spec.js on lines 204..241

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

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

            describe('weekly', () => {
                beforeEach(() => {
                    jest.spyOn(weekly, 'generateWeeklyPeriodsForYear')
                })
    
    
    Severity: Major
    Found in src/period/generators/__tests__/index.spec.js and 6 other locations - About 1 day to fix
    src/period/generators/__tests__/index.spec.js on lines 16..52
    src/period/generators/__tests__/index.spec.js on lines 92..128
    src/period/generators/__tests__/index.spec.js on lines 130..165
    src/period/generators/__tests__/index.spec.js on lines 167..202
    src/period/generators/__tests__/index.spec.js on lines 204..241
    src/period/generators/__tests__/index.spec.js on lines 243..286

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

    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

    File parser.spec.js has 517 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { getPeriodFromPeriodId } from '../parser'
    
    function makePeriodFixture(id, name, startDate, endDate, type) {
        return { id, name, startDate, endDate, type }
    }
    Severity: Major
    Found in src/period/__tests__/parser.spec.js - About 1 day to fix

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

          describe('create()', () => {
              it('should return an instance of DataStore if namespace do not exist', () => {
                  const error = { httpStatusCode: 404 }
                  apiMock.get.mockReturnValueOnce(Promise.reject(error))
      
      
      Severity: Major
      Found in src/datastore/__tests__/DataStore.spec.js and 1 other location - About 1 day to fix
      src/datastore/__tests__/UserDataStore.spec.js on lines 172..190

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

      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

          describe('create()', () => {
              it('should return an instance of UserDataStoreNamespace if namespace do not exist', () => {
                  const error = { httpStatusCode: 404 }
                  apiMock.get.mockReturnValueOnce(Promise.reject(error))
      
      
      Severity: Major
      Found in src/datastore/__tests__/UserDataStore.spec.js and 1 other location - About 1 day to fix
      src/datastore/__tests__/DataStore.spec.js on lines 155..173

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

      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

          describe('getAll()', () => {
              it('should return an array of namespaces', () => {
                  apiMock.get.mockReturnValueOnce(Promise.resolve(namespaces))
      
                  expect.assertions(1)
      Severity: Major
      Found in src/datastore/__tests__/DataStore.spec.js and 1 other location - About 7 hrs to fix
      src/datastore/__tests__/UserDataStore.spec.js on lines 120..140

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

      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

          describe('getAll()', () => {
              it('should return an array of namespaces', () => {
                  apiMock.get.mockReturnValueOnce(Promise.resolve(namespaces))
      
                  expect.assertions(1)
      Severity: Major
      Found in src/datastore/__tests__/UserDataStore.spec.js and 1 other location - About 7 hrs to fix
      src/datastore/__tests__/DataStore.spec.js on lines 107..127

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

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

              describe('.withEventStatus()', () => {
                  it('should add the eventStatus parameter with the specified value', () => {
                      request.withEventStatus('ACTIVE')
      
                      expect(request.parameters).toEqual({ eventStatus: 'ACTIVE' })
      Severity: Major
      Found in src/analytics/__tests__/AnalyticsRequest.spec.js and 6 other locations - About 6 hrs to fix
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 506..528
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 530..552
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 554..572
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 574..594
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 638..660
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 662..682

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

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

              describe('.withSortOrder()', () => {
                  it('should add the sortOrder parameter with the specified value', () => {
                      request.withSortOrder('ASC')
      
                      expect(request.parameters).toEqual({ sortOrder: 'ASC' })
      Severity: Major
      Found in src/analytics/__tests__/AnalyticsRequest.spec.js and 6 other locations - About 6 hrs to fix
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 506..528
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 530..552
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 554..572
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 574..594
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 596..616
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 638..660

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

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

              describe('.withAggregationType()', () => {
                  it('should add the aggregationType parameter with the specified value', () => {
                      request.withAggregationType('SUM')
      
                      expect(request.parameters).toEqual({ aggregationType: 'SUM' })
      Severity: Major
      Found in src/analytics/__tests__/AnalyticsRequest.spec.js and 6 other locations - About 6 hrs to fix
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 530..552
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 554..572
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 574..594
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 596..616
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 638..660
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 662..682

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

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

              describe('.withDisplayProperty()', () => {
                  it('should add the displayProperty parameter with the specified value', () => {
                      request.withDisplayProperty('NAME')
      
                      expect(request.parameters).toEqual({ displayProperty: 'NAME' })
      Severity: Major
      Found in src/analytics/__tests__/AnalyticsRequest.spec.js and 6 other locations - About 6 hrs to fix
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 506..528
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 554..572
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 574..594
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 596..616
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 638..660
      src/analytics/__tests__/AnalyticsRequest.spec.js on lines 662..682

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

      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