nelsonic/este

View on GitHub

Showing 94 of 94 total issues

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

export default connect(state => ({
  todos: state.todos.map
}), { addHundredTodos, clearAllCompletedTodos, clearAllTodos })(TodoButtons);
Severity: Minor
Found in src/native/todos/Buttons.react.js and 1 other location - About 35 mins to fix
src/browser/auth/Email.react.js on lines 196..198

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

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 list.delete(index).insert(getInsertIndex(), list.get(index));
Severity: Major
Found in src/common/lib/redux-firebase/updateList.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

          return List(val).map(item => new ItemRecord(item));
    Severity: Major
    Found in src/common/lib/redux-firebase/updateList.js - About 30 mins to fix

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

                  <div>
                    <button type="submit">
                      <FormattedMessage {...buttonsMessages.submit} />
                    </button>
                  </div>
      Severity: Minor
      Found in src/browser/fields/FieldsPage.react.js and 1 other location - About 30 mins to fix
      src/browser/app/Header.react.js on lines 19..23

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

      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

            if (index === -1) return list;
      Severity: Major
      Found in src/common/lib/redux-firebase/updateList.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

          return state;
        Severity: Major
        Found in src/common/todos/reducer.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                if (index === -1) return list;
          Severity: Major
          Found in src/common/lib/redux-firebase/updateList.js - About 30 mins to fix

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

              static propTypes = {
                addHundredTodos: PropTypes.func.isRequired,
                clearAllTodos: PropTypes.func.isRequired,
                todos: PropTypes.object.isRequired
              };
            Severity: Minor
            Found in src/browser/todos/Buttons.react.js and 1 other location - About 30 mins to fix
            src/browser/todos/Todo.react.js on lines 9..13

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

            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.updateIn(['map', todo.id, 'completed'], value => !value);
            Severity: Major
            Found in src/common/todos/reducer.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                    return state.update('map', map => map.delete(id));
              Severity: Major
              Found in src/common/todos/reducer.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                      return list.delete(index);
                Severity: Major
                Found in src/common/lib/redux-firebase/updateList.js - About 30 mins to fix

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

                          <h1>
                            <Link to="/">
                              <FormattedMessage {...linksMessages.home} />
                            </Link>
                          </h1>
                  Severity: Minor
                  Found in src/browser/app/Header.react.js and 1 other location - About 30 mins to fix
                  src/browser/fields/FieldsPage.react.js on lines 193..197

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

                  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

                    static propTypes = {
                      deleteTodo: PropTypes.func.isRequired,
                      todo: PropTypes.object.isRequired,
                      toggleTodoCompleted: PropTypes.func.isRequired
                    };
                  Severity: Minor
                  Found in src/browser/todos/Todo.react.js and 1 other location - About 30 mins to fix
                  src/browser/todos/Buttons.react.js on lines 11..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 45.

                  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 list;
                  Severity: Major
                  Found in src/common/lib/redux-firebase/updateList.js - About 30 mins to fix
                    Severity
                    Category
                    Status
                    Source
                    Language