dodekeract/manta-config-engine-app

View on GitHub

Showing 108 of 108 total issues

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

                        <div className="modal-header">
                            <button type="button" className="close" data-dismiss="modal"><span>&times;</span></button>
                            <h4 className="modal-title">Something Went Wrong</h4>
                        </div>
Severity: Major
Found in source/web/components/dialogs/error.jsx and 2 other locations - About 1 hr to fix
source/web/components/dialogs/changelog.jsx on lines 50..53
source/web/components/dialogs/confirm-delete.jsx on lines 17..20

Duplicated Code

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

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

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

Tuning

This issue has a mass of 74.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

                        <div className="modal-header">
                            <button type="button" className="close" data-dismiss="modal"><span>&times;</span></button>
                            <h4 className="modal-title">Confirm Deletion</h4>
                        </div>
Severity: Major
Found in source/web/components/dialogs/confirm-delete.jsx and 2 other locations - About 1 hr to fix
source/web/components/dialogs/changelog.jsx on lines 50..53
source/web/components/dialogs/error.jsx on lines 17..20

Duplicated Code

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

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

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

Tuning

This issue has a mass of 74.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    render: function () {
        var controls = [];
        for (var i = 0; i < this.state.preset.layouts.length; i++) {
            controls.push(
                <LayoutSelector update={this.update} id={i}/>
Severity: Minor
Found in source/web/components/preset.jsx - About 1 hr to fix

    Function purge has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        purge: function () {
            _state = {
                currentLayout: 0,
                changer: {
                    key: '',
    Severity: Minor
    Found in source/web/store.js - About 1 hr to fix

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

          render: function () {
              return (
                  <div className="preset">
                      <div className="jumbotron header">
                          <div className="container">
      Severity: Minor
      Found in source/web/components/cycle.jsx - About 1 hr to fix

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

            render: function () {
                return (
                    <div className="preset">
                        <div className="jumbotron header">
                            <div className="container">
        Severity: Minor
        Found in source/web/components/chatwheel.jsx - About 1 hr to fix

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

              render: function () {
                  return (
                      <div>
                          <nav className="navbar navbar-default navbar-fixed-top navbar-inverse">
                              <div className="container">
          Severity: Minor
          Found in source/web/components/layout.jsx - About 1 hr to fix

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

                render: function () {
                    var presetList = [];
                    for (var i = 0; i < this.state.presets.length; i++) {
                        presetList.push(
                            <Item id={this.state.presets[i]}/>
            Severity: Minor
            Found in source/web/components/presets-load.jsx - About 1 hr to fix

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

                      case constants.CYCLE_ADD_ITEM:
                          _state.changer = {mode: 'cycle', data: [], key: action.id, view: -1};
                          store.emitChange();
                          $('#bind-changer').modal('show');
                      break;
              Severity: Major
              Found in source/web/store.js and 1 other location - About 1 hr to fix
              source/web/store.js on lines 123..127

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

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

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

                      case constants.KEYBINDING_CHANGER_OPEN:
                          _state.changer = {mode: 'bind', data: [], key: action.id, view: -1};
                          store.emitChange();
                          $('#bind-changer').modal('show');
                      break;
              Severity: Major
              Found in source/web/store.js and 1 other location - About 1 hr to fix
              source/web/store.js on lines 259..263

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

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

                  renderContent: function (p, classNames, options) {
                      var button = options.interactive ?
                          (
                              <button onClick={this.remove} type="button" className="btn btn-danger btn-block">
                                  <i className="glyphicon glyphicon-trash"/> Remove
              Severity: Minor
              Found in source/web/components/chatwheels.jsx - About 1 hr to fix

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

                                    <div className="col-sm-6">
                                        <input type="text" value={this.state.preset.title} onChange={this.changeTitle} className="form-control"/>
                                    </div>
                Severity: Major
                Found in source/web/components/presets-edit.jsx and 1 other location - About 1 hr to fix
                source/web/components/presets-edit.jsx on lines 29..31

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

                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="col-sm-6">
                                        <textarea className="form-control monospace" value={this.state.preset.description} onChange={this.changeDescription} rows="20"/>
                                    </div>
                Severity: Major
                Found in source/web/components/presets-edit.jsx and 1 other location - About 1 hr to fix
                source/web/components/presets-edit.jsx on lines 20..22

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

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

                    render: function () {
                        var commands = [];
                        for (var i = 0; i < this.props.data.length; i++) {
                            commands.push(
                                <Command key={i} data={this.props.data[i]} id={i} cycle={this.props.id} action={true}/>
                Severity: Minor
                Found in source/web/components/cycles/cycle.jsx - About 1 hr to fix

                  Function renderMain has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      renderMain: function () {
                          var content = [];
                          viewData.forEach(function (node, index) {
                              var _onClick = function () {
                                  if (node.action) {
                  Severity: Minor
                  Found in source/web/components/dialogs/bind-changer.jsx - About 1 hr to fix

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

                        render: function () {
                            return (
                                <div className="presets">
                                    <div className="jumbotron header">
                                        <div className="container">
                    Severity: Minor
                    Found in source/web/components/presets.jsx - About 1 hr to fix

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

                          render: function () {
                              var action;
                              if (this.props.action) {
                                  action = (
                                      <td style={{width: '123px'}}>
                      Severity: Minor
                      Found in source/web/components/cycles/cycle.jsx - About 1 hr to fix

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

                            render: function () {
                                return (
                                    <div className="layouts margin-fix">
                                        <div className="jumbotron header">
                                            <div className="container">
                        Severity: Minor
                        Found in source/web/components/layouts.jsx - About 1 hr to fix

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

                              render: function () {
                                  var legend = [
                                      ['layout', 'duplicate', 'Layout'],
                                      ['other', 'question-sign', 'Other'],
                                      ['ability', 'font', 'Ability'],
                          Severity: Minor
                          Found in source/web/components/layouts.jsx - About 1 hr to fix

                            Function onload has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            window.onload = function () {
                                ReactDOM.render((
                                    <ReactRouter.Router>
                                        <ReactRouter.Redirect from="/" to="home"/>
                                        <ReactRouter.Route path="/" component={Layout}>
                            Severity: Minor
                            Found in source/web/main.jsx - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language