ahoym/redesert

View on GitHub

Showing 5 of 14 total issues

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

  it('determines if a single entity is being updated with getIs*Updating', () => {
    const state = makePendingStateFromAction(`${UPDATE}_${resource}_${START}`);
    expect(fooSelectors.getIsFooUpdating(state, { id })).toEqual(true);
  });
Severity: Major
Found in src/selector-factories/base-selectors.spec.ts and 2 other locations - About 1 hr to fix
src/selector-factories/base-selectors.spec.ts on lines 125..128
src/selector-factories/base-selectors.spec.ts on lines 143..146

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

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

  it('determines if a single entity is being removed with getIs*Removing', () => {
    const state = makePendingStateFromAction(`${REMOVE}_${resource}_${START}`);
    expect(fooSelectors.getIsFooRemoving(state, { id })).toEqual(true);
  });
Severity: Major
Found in src/selector-factories/base-selectors.spec.ts and 2 other locations - About 1 hr to fix
src/selector-factories/base-selectors.spec.ts on lines 125..128
src/selector-factories/base-selectors.spec.ts on lines 138..141

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

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

  it('determines if a single entity is being fetched with getIs*Fetching', () => {
    const state = makePendingStateFromAction(`${FETCH}_${resource}_${START}`);
    expect(fooSelectors.getIsFooFetching(state, { id })).toEqual(true);
  });
Severity: Major
Found in src/selector-factories/base-selectors.spec.ts and 2 other locations - About 1 hr to fix
src/selector-factories/base-selectors.spec.ts on lines 138..141
src/selector-factories/base-selectors.spec.ts on lines 143..146

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

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

  it("doesn't error if the single entity doesn't exist in get*ErrorsById", () => {
    const state = makeBlankInitialState();

    expect(fooSelectors.getFooErrorsById(state, { id: '890' })).toEqual(
      undefined
Severity: Minor
Found in src/selector-factories/base-selectors.spec.ts and 1 other location - About 55 mins to fix
src/selector-factories/base-selectors.spec.ts on lines 130..136

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

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

  it("doesn't error if the single entity doesn't exist in getIs*ing", () => {
    const state = makeBlankInitialState();

    expect(fooSelectors.getIsFooFetching(state, { id: '890' })).toEqual(
      undefined
Severity: Minor
Found in src/selector-factories/base-selectors.spec.ts and 1 other location - About 55 mins to fix
src/selector-factories/base-selectors.spec.ts on lines 107..113

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

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