Showing 251 of 251 total issues

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

Sidebar.propTypes = {
  snippets: PropTypes.object,
  theme: PropTypes.object,
  filterText: PropTypes.string,
  filterTags: PropTypes.array,
Severity: Major
Found in src/components/layout/sidebar/Sidebar.js and 2 other locations - About 3 hrs to fix
src/components/common/controls/Button.js on lines 72..83
src/components/layout/content/DashBoard.js on lines 420..431

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

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

DashBoard.propTypes = {
  snippets: PropTypes.object,
  theme: PropTypes.object,
  starred: PropTypes.number,
  searchByStatus: PropTypes.func,
Severity: Major
Found in src/components/layout/content/DashBoard.js and 2 other locations - About 3 hrs to fix
src/components/common/controls/Button.js on lines 72..83
src/components/layout/sidebar/Sidebar.js on lines 155..166

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

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 HTML has 77 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const HTML = (props) => {
  return (
    <html { ...props.htmlAttributes }>
      <head>
        <meta charSet="utf-8"/>
Severity: Major
Found in docs/src/html.js - About 3 hrs to fix

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

      test('should indicate LOGIN_WITH_TOKEN is success', () => {
        const action = {
          type: AT.LOGIN_WITH_TOKEN.SUCCESS
        };
        const initial = {
    Severity: Major
    Found in __tests__/reduceres/login.spec.js and 1 other location - About 3 hrs to fix
    __tests__/reduceres/login.spec.js on lines 64..80

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

    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

      test('should indicate LOGIN_BASIC.SUCCESS is success', () => {
        const action = {
          type: AT.LOGIN_BASIC.SUCCESS
        };
        const initial = {
    Severity: Major
    Found in __tests__/reduceres/login.spec.js and 1 other location - About 3 hrs to fix
    __tests__/reduceres/login.spec.js on lines 46..62

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

    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

    File Editor.js has 288 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import React from 'react';
    import { connect } from 'react-redux';
    import PropTypes from 'prop-types';
    import styled from 'styled-components';
    
    
    Severity: Minor
    Found in src/components/layout/content/settings/Editor.js - About 2 hrs to fix

      File helpers.js has 287 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /* eslint no-console: 0 */
      const { shell, app, Menu, ipcMain } = require('electron');
      const { autoUpdater } = require('electron-updater');
      const log = require('electron-log');
      const { init } = require('@sentry/electron');
      Severity: Minor
      Found in src/electron/main/helpers.js - About 2 hrs to fix

        Function ui has 69 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const ui = (state = initialState, action) => {
          switch (action.type) {
            case AT.GET_SNIPPETS.PENDING:
            case AT.GET_SNIPPET.PENDING:
            case AT.SET_STAR.PENDING:
        Severity: Major
        Found in src/reducers/ui.js - About 2 hrs to fix

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

          Search.propTypes = {
            snippets: PropTypes.object,
            theme: PropTypes.object,
            filterSnippets: PropTypes.func,
            filterText: PropTypes.string,
          Severity: Major
          Found in src/components/Search.js and 1 other location - About 2 hrs to fix
          src/components/layout/content/snippet/SnippetHeader.js on lines 138..148

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

          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

          SnippetHeader.propTypes = {
            file: PropTypes.object,
            theme: PropTypes.object,
            username: PropTypes.string,
            snippetId: PropTypes.string,
          Severity: Major
          Found in src/components/layout/content/snippet/SnippetHeader.js and 1 other location - About 2 hrs to fix
          src/components/Search.js on lines 122..132

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 93.

          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

          File snippetsActions.spec.js has 277 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import * as AT from 'constants/actionTypes';
          import * as snippetsActions from 'actions/snippets';
          
          const files = {
            'hi.txt': {
          Severity: Minor
          Found in __tests__/actions/snippetsActions.spec.js - About 2 hrs to fix

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

                          <StyledISelect
                            value={ getSetting('cursorBlinking', 'blink') }
                            onChange={ (event) => updateSettings('cursorBlinking', event.target.value) }>
                            <option value="blink">blink</option>
                            <option value="smooth">smooth</option>
            Severity: Major
            Found in src/components/layout/content/settings/Editor.js and 1 other location - About 2 hrs to fix
            src/components/layout/content/About.js on lines 87..99

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

            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

                    <p>
                      <ExternalLink href="https://github.com/Gisto/Gisto/blob/master/CHANGELOG.md">
                        Change log
                      </ExternalLink>
                      &nbsp;|&nbsp;
            Severity: Major
            Found in src/components/layout/content/About.js and 1 other location - About 2 hrs to fix
            src/components/layout/content/settings/Editor.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 92.

            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

              test('should filter snippet by "some" text', () => {
                const snippets = [
                  snippetStructure(snippet({ description: 'some #tag1 #tag2' })),
                  snippetStructure(snippet({ description: 'word #tag1 #tag2' })),
                  snippetStructure(snippet({ description: 'word to find #tag3 #tag4 #tag5' }))
            Severity: Major
            Found in __tests__/utils/snippets.spec.js and 1 other location - About 2 hrs to fix
            __tests__/utils/snippets.spec.js on lines 18..26

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

            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

              test('should filter snippet by (not existing text) text', () => {
                const snippets = [
                  snippetStructure(snippet({ description: 'some #tag1 #tag2' })),
                  snippetStructure(snippet({ description: 'word #tag1 #tag2' })),
                  snippetStructure(snippet({ description: 'to find #tag3 #tag4 #tag5' }))
            Severity: Major
            Found in __tests__/utils/snippets.spec.js and 1 other location - About 2 hrs to fix
            __tests__/utils/snippets.spec.js on lines 28..36

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

            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

              test('should indicate loading state is false', () => {
                const action = {
                  type: AT.GET_SNIPPETS.SUCCESS
                };
                const expectedResult = {
            Severity: Major
            Found in __tests__/reduceres/ui.spec.js and 1 other location - About 2 hrs to fix
            __tests__/reduceres/ui.spec.js on lines 22..36

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

            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

              test('should indicate loading state is true', () => {
                const action = {
                  type: AT.GET_SNIPPETS.PENDING
                };
                const expectedResult = {
            Severity: Major
            Found in __tests__/reduceres/ui.spec.js and 1 other location - About 2 hrs to fix
            __tests__/reduceres/ui.spec.js on lines 38..52

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

            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

                      <Link to="features"
                            className="w-col w-col-4 w-clearfix box bg-grey txt-white uppercase">
                        <i className="fa fa-fire-extinguisher fa-4x pull-left"/>
            
                        <h3>Features</h3>
            Severity: Major
            Found in docs/src/components/Hero.js and 2 other locations - About 2 hrs to fix
            docs/src/components/Hero.js on lines 60..69
            docs/src/components/Hero.js on lines 70..79

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

            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

                      <a href="https://web.gistoapp.com"
                         className="w-col w-col-4 w-clearfix box bg-greyer txt-white uppercase">
                        <i className="fa fa-laptop fa-4x pull-left"/>
            
                        <h3>Web client</h3>
            Severity: Major
            Found in docs/src/components/Hero.js and 2 other locations - About 2 hrs to fix
            docs/src/components/Hero.js on lines 51..59
            docs/src/components/Hero.js on lines 70..79

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

            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

                      <Field>
                        <Label>
                          <span>Font Size:</span>
                          <StyledInput
                            type="number"
            Severity: Major
            Found in src/components/layout/content/settings/Editor.js and 2 other locations - About 2 hrs to fix
            src/components/layout/content/settings/Editor.js on lines 161..169
            src/components/layout/content/settings/Editor.js on lines 209..219

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

            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