dodekeract/manta-config-engine-app

View on GitHub

Showing 34 of 108 total issues

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 () {
            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 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 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

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

                render: function () {
                    var lastAppVersion = localStorage.lastAppVersion || '1.9.2';
                    var lastEngineVersion = localStorage.lastEngineVersion || '1.8.2';
                    var engineChanges = this.renderCategory(changelog.engine, lastEngineVersion);
                    var appChanges = this.renderCategory(changelog.app, lastAppVersion);
            Severity: Minor
            Found in source/web/components/dialogs/changelog.jsx - About 1 hr to fix

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

                  render: function () {
                      var span = this.props.width.toString().replace(/\./g, '-');
                      if (this.props.name === 'empty') {
                          return (<div className={"key key-empty span-" + span}>&nbsp;<br/>&nbsp;</div>);
                      } else {
              Severity: Minor
              Found in source/web/components/keyboard.jsx - About 1 hr to fix

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

                    render: function () {
                        var sets = [];
                        for (var i = 0; i < this.props.sets.length; i++) {
                            sets.push(
                                <Setting
                Severity: Minor
                Found in source/web/components/settings-panel.jsx - About 1 hr to fix

                  Avoid too many return statements within this function.
                  Open

                                  return ['key-open', shortMatch[c[1]], 'Open ' + window.capitalize(c[1])];
                  Severity: Major
                  Found in source/web/main.jsx - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                        return 0;
                    Severity: Major
                    Found in source/web/main.jsx - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return matcher[c[1]];
                      Severity: Major
                      Found in source/web/main.jsx - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                        return ['key-open', c[1], 'Open ' + window.capitalize(c[1])];
                        Severity: Major
                        Found in source/web/main.jsx - About 30 mins to fix

                          Function render has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                              render: function () {
                                  var span = this.props.width.toString().replace(/\./g, '-');
                                  if (this.props.name === 'empty') {
                                      return (<div className={"key key-empty span-" + span}>&nbsp;<br/>&nbsp;</div>);
                                  } else {
                          Severity: Minor
                          Found in source/web/components/keyboard.jsx - About 25 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function compareVersion has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                          Open

                          window.compareVersion = function (a, b) {
                              if (!a) return -1;
                              if (!b) return 1;
                          
                              var _a = a.split('.');
                          Severity: Minor
                          Found in source/web/main.jsx - About 25 mins to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Severity
                          Category
                          Status
                          Source
                          Language