Showing 251 of 251 total issues

Function searchType has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const searchType = () => {
    if (!isEmpty(trim(filterText))) {
      return isTag(filterText) ? 'free text tag' : 'free text';
    }

Severity: Minor
Found in src/components/layout/sidebar/Sidebar.js - About 1 hr to fix

    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

    Function updateChecker has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function updateChecker(mainWindow) {
      ipcMain.on('downloadUpdate', () => autoUpdater.downloadUpdate());
      ipcMain.on('quitAndInstall', () => autoUpdater.quitAndInstall(true, true));
    
      autoUpdater.logger = log;
    Severity: Minor
    Found in src/electron/main/helpers.js - About 1 hr to fix

      Function prepareFilesForUpdate has 36 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const prepareFilesForUpdate = (snippet: ISnippet) => {
        const cleanFiles = flow([
          map((file) => {
            return pick(['filename', 'content', 'originalFileName', 'delete', 'isNew'], file);
          }),
      Severity: Minor
      Found in src/utils/snippets.ts - About 1 hr to fix

        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

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

          test('getSnippet action should be created', () => {
            expect(snippetsActions.getSnippet('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 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 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('filterSnippetsByText action should be created', () => {
            expect(snippetsActions.filterSnippetsByText('some text')).toEqual({
              meta: {
                value: 'some text'
              },
        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 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 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('filterSnippetsByStatus action should be created', () => {
            expect(snippetsActions.filterSnippetsByStatus('private')).toEqual({
              meta: {
                status: 'private'
              },
        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 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('getSnippetComments action should be created', () => {
          expect(snippetsActions.getSnippetComments('123123')).toEqual({
            meta: {
              id: '123123'
            },
        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 182..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 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('deleteSnippet action should be created', () => {
            expect(snippetsActions.deleteSnippet('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 106..114
        __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('editSnippet action should be created', () => {
            expect(snippetsActions.editSnippet('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 106..114
        __tests__/actions/snippetsActions.spec.js on lines 156..164
        __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

        Function render has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          render() {
            const { snippet, edit, tempSnippet, showComments, addTempFile } = this.props;
            const currentSnippet = edit ? tempSnippet : snippet;
            const files = filter((file) => !file.delete, get('files', currentSnippet));
        
        
        Severity: Minor
        Found in src/components/layout/content/Snippet.js - About 1 hr to fix
          Severity
          Category
          Status
          Source
          Language