Showing 161 of 251 total issues

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

            <Starred
              style={ this.linearGradient(starred) }
              onClick={ () => searchByStatus('starred') }
              title="Click to filter starred snippets">
              <h3>Starred</h3>
Severity: Major
Found in src/components/layout/content/DashBoard.js and 2 other locations - About 1 hr to fix
src/components/layout/content/DashBoard.js on lines 310..316
src/components/layout/content/DashBoard.js on lines 318..324

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

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

            <Truncated
              style={ this.linearGradient(truncatedSnippets) }
              onClick={ () => searchByTruncated() }
              title="Click to filter snippets with large files">
              <h3>Large</h3>
Severity: Major
Found in src/components/layout/content/DashBoard.js and 1 other location - About 1 hr to fix
src/components/layout/content/DashBoard.js on lines 342..348

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

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

            <Untagged
              style={ this.linearGradient(untaggedSnippets) }
              onClick={ () => searchByUntagged() }
              title="Click to filter snippets with no tags">
              <h3>Untagged</h3>
Severity: Major
Found in src/components/layout/content/DashBoard.js and 1 other location - About 1 hr to fix
src/components/layout/content/DashBoard.js on lines 334..340

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

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

    case AT.SET_STAR.SUCCESS: {
      return flow([
        set(['starred'], concat([action.meta.id], state.starred)),
        set(['snippets', action.meta.id, 'star'], true)
      ])(state);
Severity: Major
Found in src/reducers/snippets.js and 1 other location - About 1 hr to fix
src/reducers/snippets.js on lines 163..168

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

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

    case AT.UNSET_STAR.SUCCESS: {
      return flow([
        set(['starred'], without([action.meta.id], state.starred)),
        set(['snippets', action.meta.id, 'star'], false)
      ])(state);
Severity: Major
Found in src/reducers/snippets.js and 1 other location - About 1 hr to fix
src/reducers/snippets.js on lines 156..161

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

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

          <div className="w-col w-col-4 w-clearfix feat">
            <img alt="Tagging" src={ taggingImage }/>

            <h3>Gist tagging</h3>

Severity: Major
Found in docs/src/pages/features.js and 2 other locations - About 1 hr to fix
docs/src/pages/features.js on lines 61..72
docs/src/pages/features.js on lines 80..89

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

          <div className="w-col w-col-4 w-clearfix feat">
            <img alt="regular and enterprise login" src={ enterpriseImage }/>

            <h3>Enterprise mode</h3>

Severity: Major
Found in docs/src/pages/features.js and 2 other locations - About 1 hr to fix
docs/src/pages/features.js on lines 49..59
docs/src/pages/features.js on lines 61..72

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

            <div className="w-col w-col-4 w-clearfix feat">
              <img src={ taggingImg } alt="Edit"/>

              <h3>Tags</h3>

Severity: Major
Found in docs/src/pages/index.js and 1 other location - About 1 hr to fix
docs/src/pages/features.js on lines 147..156

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

          <div className="w-col w-col-4 w-clearfix feat">
            <img alt="Options" src={ optionsImage }/>

            <h3>Quick actions</h3>

Severity: Major
Found in docs/src/pages/features.js and 2 other locations - About 1 hr to fix
docs/src/pages/features.js on lines 49..59
docs/src/pages/features.js on lines 80..89

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

          <div className="w-col w-col-4 w-clearfix feat">
            <img src={ themeImage } alt="Themes"/>

            <h3>Color SWITCHING</h3>

Severity: Major
Found in docs/src/pages/features.js and 1 other location - About 1 hr to fix
docs/src/pages/index.js on lines 78..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 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

          <div className="w-col w-col-4 w-clearfix feat">
            <img src={ dragAnsDropImage } alt="Drag and drop"/>

            <h3>Drag &amp; Drop</h3>

Severity: Major
Found in docs/src/pages/features.js and 1 other location - About 1 hr to fix
docs/src/pages/features.js on lines 162..171

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

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

          <div className="w-col w-col-4 w-clearfix feat">
            <img src={ colorsImage } alt="App color"/>

            <h3>Choose any color</h3>

Severity: Major
Found in docs/src/pages/features.js and 1 other location - About 1 hr to fix
docs/src/pages/features.js on lines 134..145

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

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

  test('deleteTempFile action should be created', () => {
    expect(snippetsActions.deleteTempFile('id123id123')).toEqual({
      meta: {
        uuid: 'id123id123'
      },
Severity: Major
Found in __tests__/actions/snippetsActions.spec.js and 11 other locations - About 1 hr to fix
__tests__/actions/snippetsActions.spec.js on lines 24..32
__tests__/actions/snippetsActions.spec.js on lines 34..42
__tests__/actions/snippetsActions.spec.js on lines 44..52
__tests__/actions/snippetsActions.spec.js on lines 54..62
__tests__/actions/snippetsActions.spec.js on lines 64..72
__tests__/actions/snippetsActions.spec.js on lines 86..94
__tests__/actions/snippetsActions.spec.js on lines 96..104
__tests__/actions/snippetsActions.spec.js on lines 106..114
__tests__/actions/snippetsActions.spec.js on lines 156..164
__tests__/actions/snippetsActions.spec.js on lines 166..174
__tests__/actions/snippetsActions.spec.js on lines 264..274

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

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

  test('filterSnippetsByLanguage action should be created', () => {
    expect(snippetsActions.filterSnippetsByLanguage('HTML')).toEqual({
      meta: {
        value: 'HTML'
      },
Severity: Major
Found in __tests__/actions/snippetsActions.spec.js and 11 other locations - About 1 hr to fix
__tests__/actions/snippetsActions.spec.js on lines 24..32
__tests__/actions/snippetsActions.spec.js on lines 34..42
__tests__/actions/snippetsActions.spec.js on lines 44..52
__tests__/actions/snippetsActions.spec.js on lines 64..72
__tests__/actions/snippetsActions.spec.js on lines 86..94
__tests__/actions/snippetsActions.spec.js on lines 96..104
__tests__/actions/snippetsActions.spec.js on lines 106..114
__tests__/actions/snippetsActions.spec.js on lines 156..164
__tests__/actions/snippetsActions.spec.js on lines 166..174
__tests__/actions/snippetsActions.spec.js on lines 182..190
__tests__/actions/snippetsActions.spec.js on lines 264..274

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

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

  test('filterSnippetsByTags action should be created', () => {
    expect(snippetsActions.filterSnippetsByTags('#tag')).toEqual({
      meta: {
        value: '#tag'
      },
Severity: Major
Found in __tests__/actions/snippetsActions.spec.js and 11 other locations - About 1 hr to fix
__tests__/actions/snippetsActions.spec.js on lines 24..32
__tests__/actions/snippetsActions.spec.js on lines 34..42
__tests__/actions/snippetsActions.spec.js on lines 54..62
__tests__/actions/snippetsActions.spec.js on lines 64..72
__tests__/actions/snippetsActions.spec.js on lines 86..94
__tests__/actions/snippetsActions.spec.js on lines 96..104
__tests__/actions/snippetsActions.spec.js on lines 106..114
__tests__/actions/snippetsActions.spec.js on lines 156..164
__tests__/actions/snippetsActions.spec.js on lines 166..174
__tests__/actions/snippetsActions.spec.js on lines 182..190
__tests__/actions/snippetsActions.spec.js on lines 264..274

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

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

const UpdaterMenu = styled.div`
  background: ${(props) => props.theme.lightText};
  width: max-content;
  line-height: 21px;
  padding: 20px;
Severity: Major
Found in src/components/layout/Updater.js and 1 other location - About 1 hr to fix
src/components/layout/content/snippet/SnippetHeader.js on lines 18..28

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

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

const SnippetHeaderWrapper = styled.div`
  display: flex;
  flex: 1;
  padding: 0 0 0 20px;
  border-bottom: 1px solid ${(props) => props.theme.borderColor};
Severity: Major
Found in src/components/layout/content/snippet/SnippetHeader.js and 1 other location - About 1 hr to fix
src/components/layout/Updater.js on lines 30..42

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

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

  test('starSnippet action should be created', () => {
    expect(snippetsActions.starSnippet('id123id123')).toEqual({
      meta: {
        id: 'id123id123'
      },
Severity: Major
Found in __tests__/actions/snippetsActions.spec.js and 11 other locations - About 1 hr to fix
__tests__/actions/snippetsActions.spec.js on lines 24..32
__tests__/actions/snippetsActions.spec.js on lines 34..42
__tests__/actions/snippetsActions.spec.js on lines 44..52
__tests__/actions/snippetsActions.spec.js on lines 54..62
__tests__/actions/snippetsActions.spec.js on lines 64..72
__tests__/actions/snippetsActions.spec.js on lines 86..94
__tests__/actions/snippetsActions.spec.js on lines 106..114
__tests__/actions/snippetsActions.spec.js on lines 156..164
__tests__/actions/snippetsActions.spec.js on lines 166..174
__tests__/actions/snippetsActions.spec.js on lines 182..190
__tests__/actions/snippetsActions.spec.js on lines 264..274

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

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

  test('unStarSnippet action should be created', () => {
    expect(snippetsActions.unStarSnippet('id123id123')).toEqual({
      meta: {
        id: 'id123id123'
      },
Severity: Major
Found in __tests__/actions/snippetsActions.spec.js and 11 other locations - About 1 hr to fix
__tests__/actions/snippetsActions.spec.js on lines 24..32
__tests__/actions/snippetsActions.spec.js on lines 34..42
__tests__/actions/snippetsActions.spec.js on lines 44..52
__tests__/actions/snippetsActions.spec.js on lines 54..62
__tests__/actions/snippetsActions.spec.js on lines 64..72
__tests__/actions/snippetsActions.spec.js on lines 86..94
__tests__/actions/snippetsActions.spec.js on lines 96..104
__tests__/actions/snippetsActions.spec.js on lines 156..164
__tests__/actions/snippetsActions.spec.js on lines 166..174
__tests__/actions/snippetsActions.spec.js on lines 182..190
__tests__/actions/snippetsActions.spec.js on lines 264..274

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

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

  test('removeTagFromFilter action should be created', () => {
    expect(snippetsActions.removeTagFromFilter('#tag2')).toEqual({
      meta: {
        tag: '#tag2'
      },
Severity: Major
Found in __tests__/actions/snippetsActions.spec.js and 11 other locations - About 1 hr to fix
__tests__/actions/snippetsActions.spec.js on lines 24..32
__tests__/actions/snippetsActions.spec.js on lines 34..42
__tests__/actions/snippetsActions.spec.js on lines 44..52
__tests__/actions/snippetsActions.spec.js on lines 54..62
__tests__/actions/snippetsActions.spec.js on lines 64..72
__tests__/actions/snippetsActions.spec.js on lines 96..104
__tests__/actions/snippetsActions.spec.js on lines 106..114
__tests__/actions/snippetsActions.spec.js on lines 156..164
__tests__/actions/snippetsActions.spec.js on lines 166..174
__tests__/actions/snippetsActions.spec.js on lines 182..190
__tests__/actions/snippetsActions.spec.js on lines 264..274

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

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