Showing 251 of 251 total issues

Avoid too many return statements within this function.
Open

        return set(['settings', action.payload.key], result, state);
Severity: Major
Found in src/reducers/ui.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

          return flow([
            set(['edit', 'description'], description),
            set(['edit', 'files'], keyBy('uuid', preparedFiles))
          ])(state);
    Severity: Major
    Found in src/reducers/snippets.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return set(['settings', action.payload.key], action.payload.value, state);
      Severity: Major
      Found in src/reducers/ui.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

              return flow([set('rateLimit', action.payload), set(['rateLimit', 'loading'], false)])(state);
        Severity: Major
        Found in src/reducers/ui.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return flow([
                    set(['settings', action.payload.key], action.payload.value),
                    set(['settings', 'theme', 'baseAppColor'], action.payload.value),
                    set(
                      ['settings', 'theme', 'headerBgLightest'],
          Severity: Major
          Found in src/reducers/ui.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

              return snippets;
            Severity: Major
            Found in src/utils/snippets.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                    return set(['edit', 'files'], merge(newFile, existingFiles || {}), state);
              Severity: Major
              Found in src/reducers/snippets.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return filter((snippet) => snippet.tags === null || size(snippet.tags) === 0, sortedSnippets);
                Severity: Major
                Found in src/utils/snippets.ts - About 30 mins to fix

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

                  describe('COMPONENTS - <About>', () => {
                    test('render About', () => {
                      const component = setup();
                  
                      expect(component).toMatchSnapshot();
                  Severity: Major
                  Found in __tests__/components/layout/content/About.spec.js and 11 other locations - About 30 mins to fix
                  __tests__/components/common/Languagelist.spec.js on lines 15..21
                  __tests__/components/layout/App.spec.js on lines 11..17
                  __tests__/components/layout/KeyBindings.spec.js on lines 5..11
                  __tests__/components/layout/Updater.js on lines 9..15
                  __tests__/components/layout/content/NewSnippet.spec.js on lines 19..25
                  __tests__/components/layout/content/Settings.spec.js on lines 9..15
                  __tests__/components/layout/content/settings/Editor.spec.js on lines 10..16
                  __tests__/components/layout/content/settings/Snippets.spec.js on lines 10..16
                  __tests__/components/layout/headers/SubHeader.spec.js on lines 9..15
                  __tests__/components/layout/sidebar/Sidebar.spec.js on lines 9..15
                  __tests__/components/layout/sidebar/SnippetsList.spec.js on lines 9..15

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

                  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

                  describe('COMPONENTS - <SnippetsSettings>', () => {
                    test('render SnippetsSettings', () => {
                      const component = setup();
                  
                      expect(component).toMatchSnapshot();
                  Severity: Major
                  Found in __tests__/components/layout/content/settings/Snippets.spec.js and 11 other locations - About 30 mins to fix
                  __tests__/components/common/Languagelist.spec.js on lines 15..21
                  __tests__/components/layout/App.spec.js on lines 11..17
                  __tests__/components/layout/KeyBindings.spec.js on lines 5..11
                  __tests__/components/layout/Updater.js on lines 9..15
                  __tests__/components/layout/content/About.spec.js on lines 14..20
                  __tests__/components/layout/content/NewSnippet.spec.js on lines 19..25
                  __tests__/components/layout/content/Settings.spec.js on lines 9..15
                  __tests__/components/layout/content/settings/Editor.spec.js on lines 10..16
                  __tests__/components/layout/headers/SubHeader.spec.js on lines 9..15
                  __tests__/components/layout/sidebar/Sidebar.spec.js on lines 9..15
                  __tests__/components/layout/sidebar/SnippetsList.spec.js on lines 9..15

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

                  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

                  Avoid too many return statements within this function.
                  Open

                        return state;
                  Severity: Major
                  Found in src/reducers/login.js - About 30 mins to fix

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

                          API.post(`${getApiUrl('/api/v3')}/gists/${action.payload.id}/comments`)
                            .set(_headers())
                            .send({ body: action.payload.body })
                    Severity: Major
                    Found in src/middlewares/gitHubAPI.js and 5 other locations - About 30 mins to fix
                    src/middlewares/gitHubAPI.js on lines 182..194
                    src/middlewares/gitHubAPI.js on lines 224..242
                    src/middlewares/gitHubAPI.js on lines 267..280
                    src/middlewares/gitHubAPI.js on lines 286..288
                    src/middlewares/gitHubAPI.js on lines 302..314

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

                    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

                    describe('COMPONENTS - <Updater>', () => {
                      test('render Updater', () => {
                        const component = setup();
                    
                        expect(component).toMatchSnapshot();
                    Severity: Major
                    Found in __tests__/components/layout/Updater.js and 11 other locations - About 30 mins to fix
                    __tests__/components/common/Languagelist.spec.js on lines 15..21
                    __tests__/components/layout/App.spec.js on lines 11..17
                    __tests__/components/layout/KeyBindings.spec.js on lines 5..11
                    __tests__/components/layout/content/About.spec.js on lines 14..20
                    __tests__/components/layout/content/NewSnippet.spec.js on lines 19..25
                    __tests__/components/layout/content/Settings.spec.js on lines 9..15
                    __tests__/components/layout/content/settings/Editor.spec.js on lines 10..16
                    __tests__/components/layout/content/settings/Snippets.spec.js on lines 10..16
                    __tests__/components/layout/headers/SubHeader.spec.js on lines 9..15
                    __tests__/components/layout/sidebar/Sidebar.spec.js on lines 9..15
                    __tests__/components/layout/sidebar/SnippetsList.spec.js on lines 9..15

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

                    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

                    Avoid too many return statements within this function.
                    Open

                          return 'large files';
                    Severity: Major
                    Found in src/components/layout/sidebar/Sidebar.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                            return state;
                      Severity: Major
                      Found in src/reducers/snippets.js - About 30 mins to fix

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

                        describe('COMPONENTS - <Languagelist>', () => {
                          test('render Languagelist', () => {
                            const component = setup();
                        
                            expect(component).toMatchSnapshot();
                        Severity: Major
                        Found in __tests__/components/common/Languagelist.spec.js and 11 other locations - About 30 mins to fix
                        __tests__/components/layout/App.spec.js on lines 11..17
                        __tests__/components/layout/KeyBindings.spec.js on lines 5..11
                        __tests__/components/layout/Updater.js on lines 9..15
                        __tests__/components/layout/content/About.spec.js on lines 14..20
                        __tests__/components/layout/content/NewSnippet.spec.js on lines 19..25
                        __tests__/components/layout/content/Settings.spec.js on lines 9..15
                        __tests__/components/layout/content/settings/Editor.spec.js on lines 10..16
                        __tests__/components/layout/content/settings/Snippets.spec.js on lines 10..16
                        __tests__/components/layout/headers/SubHeader.spec.js on lines 9..15
                        __tests__/components/layout/sidebar/Sidebar.spec.js on lines 9..15
                        __tests__/components/layout/sidebar/SnippetsList.spec.js on lines 9..15

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

                        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

                        Avoid too many return statements within this function.
                        Open

                              return flow([
                                set(['filter', 'text'], ''),
                                set(['filter', 'tags'], []),
                                set(['filter', 'language'], ''),
                                set(['filter', 'status'], ''),
                        Severity: Major
                        Found in src/reducers/snippets.js - About 30 mins to fix

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

                          describe('COMPONENTS - <NewSnippet>', () => {
                            test('render NewSnippet', () => {
                              const component = setup();
                          
                              expect(component).toMatchSnapshot();
                          Severity: Major
                          Found in __tests__/components/layout/content/NewSnippet.spec.js and 11 other locations - About 30 mins to fix
                          __tests__/components/common/Languagelist.spec.js on lines 15..21
                          __tests__/components/layout/App.spec.js on lines 11..17
                          __tests__/components/layout/KeyBindings.spec.js on lines 5..11
                          __tests__/components/layout/Updater.js on lines 9..15
                          __tests__/components/layout/content/About.spec.js on lines 14..20
                          __tests__/components/layout/content/Settings.spec.js on lines 9..15
                          __tests__/components/layout/content/settings/Editor.spec.js on lines 10..16
                          __tests__/components/layout/content/settings/Snippets.spec.js on lines 10..16
                          __tests__/components/layout/headers/SubHeader.spec.js on lines 9..15
                          __tests__/components/layout/sidebar/Sidebar.spec.js on lines 9..15
                          __tests__/components/layout/sidebar/SnippetsList.spec.js on lines 9..15

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

                          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

                          Avoid too many return statements within this function.
                          Open

                                return flow([
                                  set(['starred'], without([action.meta.id], state.starred)),
                                  omit([['snippets', action.meta.id]])
                                ])(state);
                          Severity: Major
                          Found in src/reducers/snippets.js - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                  return set(updatePath, value, state);
                            Severity: Major
                            Found in src/reducers/snippets.js - About 30 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language