InsidersByte/honeymoon-gift-list

View on GitHub

Showing 240 of 276 total issues

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

  describe('getIsModalOpen', () => {
    it('should call and return users.getIsModalOpen', () => {
      const state = { users: { users: [{ id: 1 }] } };

      getIsModalOpen.mockReturnValueOnce(true);
Severity: Major
Found in public/redux/index.test.js and 3 other locations - About 5 hrs to fix
public/redux/index.test.js on lines 104..117
public/redux/index.test.js on lines 119..132
public/redux/index.test.js on lines 134..147

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

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

  describe('getIsDeleting', () => {
    it('should call and return users.getIsDeleting', () => {
      const state = { users: { users: [{ id: 1 }] } };

      getIsDeleting.mockReturnValueOnce(true);
Severity: Major
Found in public/redux/index.test.js and 3 other locations - About 5 hrs to fix
public/redux/index.test.js on lines 89..102
public/redux/index.test.js on lines 104..117
public/redux/index.test.js on lines 119..132

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

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

    it('should handle LOAD_USERS_REQUEST', () => {
      expect(reducer({ ...initialState, isLoading: false }, { type: 'our-wedding-heroes/users/LOAD_USERS_REQUEST' })).toEqual({
        isLoading: true,
        isSaving: false,
        isDeleting: false,
Severity: Major
Found in public/redux/users.test.js and 8 other locations - About 5 hrs to fix
public/redux/users.test.js on lines 55..71
public/redux/users.test.js on lines 73..89
public/redux/users.test.js on lines 91..107
public/redux/users.test.js on lines 147..163
public/redux/users.test.js on lines 165..181
public/redux/users.test.js on lines 203..219
public/redux/users.test.js on lines 246..262
public/redux/users.test.js on lines 264..280

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

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

    it('should handle CLOSE_USER_MODAL', () => {
      expect(reducer({ ...initialState, isModalOpen: false }, { type: 'our-wedding-heroes/users/CLOSE_USER_MODAL' })).toEqual({
        isLoading: false,
        isSaving: false,
        isDeleting: false,
Severity: Major
Found in public/redux/users.test.js and 8 other locations - About 5 hrs to fix
public/redux/users.test.js on lines 55..71
public/redux/users.test.js on lines 91..107
public/redux/users.test.js on lines 109..125
public/redux/users.test.js on lines 147..163
public/redux/users.test.js on lines 165..181
public/redux/users.test.js on lines 203..219
public/redux/users.test.js on lines 246..262
public/redux/users.test.js on lines 264..280

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

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

    it('should handle DELETE_USER_SUCCESS', () => {
      expect(reducer({ ...initialState, isDeleting: true }, { type: 'our-wedding-heroes/users/DELETE_USER_SUCCESS' })).toEqual({
        isLoading: false,
        isSaving: false,
        isDeleting: false,
Severity: Major
Found in public/redux/users.test.js and 8 other locations - About 5 hrs to fix
public/redux/users.test.js on lines 55..71
public/redux/users.test.js on lines 73..89
public/redux/users.test.js on lines 91..107
public/redux/users.test.js on lines 109..125
public/redux/users.test.js on lines 147..163
public/redux/users.test.js on lines 165..181
public/redux/users.test.js on lines 203..219
public/redux/users.test.js on lines 264..280

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

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

    it('should handle CREATE_USER_ERROR', () => {
      expect(reducer({ ...initialState, isSaving: true }, { type: 'our-wedding-heroes/users/CREATE_USER_ERROR' })).toEqual({
        isLoading: false,
        isSaving: false,
        isDeleting: false,
Severity: Major
Found in public/redux/users.test.js and 8 other locations - About 5 hrs to fix
public/redux/users.test.js on lines 55..71
public/redux/users.test.js on lines 73..89
public/redux/users.test.js on lines 91..107
public/redux/users.test.js on lines 109..125
public/redux/users.test.js on lines 147..163
public/redux/users.test.js on lines 165..181
public/redux/users.test.js on lines 246..262
public/redux/users.test.js on lines 264..280

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

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

    it('should handle CREATE_USER_REQUEST', () => {
      expect(reducer({ ...initialState, isSaving: true }, { type: 'our-wedding-heroes/users/CREATE_USER_REQUEST' })).toEqual({
        isLoading: false,
        isSaving: true,
        isDeleting: false,
Severity: Major
Found in public/redux/users.test.js and 8 other locations - About 5 hrs to fix
public/redux/users.test.js on lines 55..71
public/redux/users.test.js on lines 73..89
public/redux/users.test.js on lines 91..107
public/redux/users.test.js on lines 109..125
public/redux/users.test.js on lines 147..163
public/redux/users.test.js on lines 203..219
public/redux/users.test.js on lines 246..262
public/redux/users.test.js on lines 264..280

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

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

    it('should handle OPEN_USER_MODAL', () => {
      expect(reducer({ ...initialState, isModalOpen: false }, { type: 'our-wedding-heroes/users/OPEN_USER_MODAL' })).toEqual({
        isLoading: false,
        isSaving: false,
        isDeleting: false,
Severity: Major
Found in public/redux/users.test.js and 8 other locations - About 5 hrs to fix
public/redux/users.test.js on lines 73..89
public/redux/users.test.js on lines 91..107
public/redux/users.test.js on lines 109..125
public/redux/users.test.js on lines 147..163
public/redux/users.test.js on lines 165..181
public/redux/users.test.js on lines 203..219
public/redux/users.test.js on lines 246..262
public/redux/users.test.js on lines 264..280

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

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

    it('should handle CLOSE_USER_MODAL', () => {
      expect(reducer({ ...initialState, isModalOpen: false }, { type: 'our-wedding-heroes/users/CLOSE_USER_MODAL' })).toEqual({
        isLoading: false,
        isSaving: false,
        isDeleting: false,
Severity: Major
Found in public/redux/users.test.js and 8 other locations - About 5 hrs to fix
public/redux/users.test.js on lines 55..71
public/redux/users.test.js on lines 73..89
public/redux/users.test.js on lines 109..125
public/redux/users.test.js on lines 147..163
public/redux/users.test.js on lines 165..181
public/redux/users.test.js on lines 203..219
public/redux/users.test.js on lines 246..262
public/redux/users.test.js on lines 264..280

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

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

    it('should handle LOAD_USERS_ERROR', () => {
      expect(reducer({ ...initialState, isLoading: true }, { type: 'our-wedding-heroes/users/LOAD_USERS_ERROR' })).toEqual({
        isLoading: false,
        isSaving: false,
        isDeleting: false,
Severity: Major
Found in public/redux/users.test.js and 8 other locations - About 5 hrs to fix
public/redux/users.test.js on lines 55..71
public/redux/users.test.js on lines 73..89
public/redux/users.test.js on lines 91..107
public/redux/users.test.js on lines 109..125
public/redux/users.test.js on lines 165..181
public/redux/users.test.js on lines 203..219
public/redux/users.test.js on lines 246..262
public/redux/users.test.js on lines 264..280

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

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

    it('should handle DELETE_USER_ERROR', () => {
      expect(reducer({ ...initialState, isDeleting: true }, { type: 'our-wedding-heroes/users/DELETE_USER_ERROR' })).toEqual({
        isLoading: false,
        isSaving: false,
        isDeleting: false,
Severity: Major
Found in public/redux/users.test.js and 8 other locations - About 5 hrs to fix
public/redux/users.test.js on lines 55..71
public/redux/users.test.js on lines 73..89
public/redux/users.test.js on lines 91..107
public/redux/users.test.js on lines 109..125
public/redux/users.test.js on lines 147..163
public/redux/users.test.js on lines 165..181
public/redux/users.test.js on lines 203..219
public/redux/users.test.js on lines 246..262

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

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('should render not deletable correctly', () => {
    const user = { id: 1, email: 'email@email.com', name: 'person' };
    const loggedInUser = { email: 'email@email.com' };
    const onDelete = jest.fn();

Severity: Major
Found in public/components/ActiveUserListItem/index.test.jsx and 1 other location - About 4 hrs to fix
public/components/ActiveUserListItem/index.test.jsx on lines 11..20

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

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('should render deletable correctly', () => {
    const user = { id: 1, email: 'email@email.com', name: 'person' };
    const loggedInUser = { email: 'anotheremail@email.com' };
    const onDelete = jest.fn();

Severity: Major
Found in public/components/ActiveUserListItem/index.test.jsx and 1 other location - About 4 hrs to fix
public/components/ActiveUserListItem/index.test.jsx on lines 39..48

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

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('getBasketCount', () => {
    it('should call and return basket.getBasketCount', () => {
      const state = { basket: {} };

      getBasketCount.mockReturnValueOnce(10);
Severity: Major
Found in public/redux/index.test.js and 1 other location - About 4 hrs to fix
public/redux/index.test.js on lines 42..55

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

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('getBasketTotal', () => {
    it('should call and return basket.getBasketTotal', () => {
      const state = { basket: {} };

      getBasketTotal.mockReturnValueOnce(10);
Severity: Major
Found in public/redux/index.test.js and 1 other location - About 4 hrs to fix
public/redux/index.test.js on lines 27..40

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

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

  router
    .route('/:id')
    .get(
      wrap(function* getSection(req, res) {
        const { id } = req.params;
Severity: Major
Found in server/routes/api/section.js and 2 other locations - About 4 hrs to fix
server/routes/api/gift.js on lines 55..111
server/routes/api/weddingPartyMember.js on lines 55..125

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

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

  router
    .route('/:id')
    .put(
      secure,
      wrap(function* updateGift(req, res) {
Severity: Major
Found in server/routes/api/gift.js and 2 other locations - About 4 hrs to fix
server/routes/api/section.js on lines 51..118
server/routes/api/weddingPartyMember.js on lines 55..125

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

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

  router
    .route('/:id')
    .get(
      secure,
      wrap(function* getWeddingPartyMember(req, res) {
Severity: Major
Found in server/routes/api/weddingPartyMember.js and 2 other locations - About 4 hrs to fix
server/routes/api/gift.js on lines 55..111
server/routes/api/section.js on lines 51..118

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

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

export function signUp(data) {
  return {
    [CALL_API]: {
      data,
      endpoint: `signUp/${data.token}`,
Severity: Major
Found in public/actions/signUp.js and 1 other location - About 3 hrs to fix
public/actions/auth.js on lines 53..66

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

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

export function resetPassword(data) {
  return {
    [CALL_API]: {
      data,
      endpoint: `authenticate/resetPassword/${data.token}`,
Severity: Major
Found in public/actions/auth.js and 1 other location - About 3 hrs to fix
public/actions/signUp.js on lines 18..31

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

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