yoichiro/chrome_mysql_admin

View on GitHub

Showing 375 of 375 total issues

Function drawText has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

            var drawText = function(x, y, text, name, group, onDragHandler, onDragEndHandler, canvas) {
Severity: Major
Found in app/scripts/window/directives/er_diagram.js - About 1 hr to fix

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

            if ($scope.type === "SET" || $scope.type === "ENUM") {
                sql += "(" + sqlExpressionService.createStringArray($scope.setEnumValues) + ")";
            }
    Severity: Minor
    Found in app/scripts/window/controllers/add_column_dialog_controller.js and 1 other location - About 55 mins to fix
    app/scripts/window/controllers/edit_column_dialog_controller.js on lines 199..201

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

    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

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

            if ($scope.type === "SET" || $scope.type === "ENUM") {
                sql += "(" + sqlExpressionService.createStringArray($scope.setEnumValues) + ")";
            }
    Severity: Minor
    Found in app/scripts/window/controllers/edit_column_dialog_controller.js and 1 other location - About 55 mins to fix
    app/scripts/window/controllers/add_column_dialog_controller.js on lines 89..91

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

    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

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

            do {
              code_point = this._decoder.decode(input_stream);
              if (code_point !== null && code_point !== EOF_code_point) {
                output_stream.emit(code_point);
              }
    Severity: Minor
    Found in app/scripts/lib/encoding.js and 1 other location - About 55 mins to fix
    app/scripts/lib/encoding.js on lines 2385..2390

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

    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

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

          while (input_stream.get() !== EOF_byte) {
            code_point = this._decoder.decode(input_stream);
            if (code_point !== null && code_point !== EOF_code_point) {
              output_stream.emit(code_point);
            }
    Severity: Minor
    Found in app/scripts/lib/encoding.js and 1 other location - About 55 mins to fix
    app/scripts/lib/encoding.js on lines 2392..2397

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

    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 5 locations. Consider refactoring.
    Open

        $scope.updateRow = function() {
            if ($scope.isTable() && $scope.isRowSelection()) {
                targetObjectService.requestUpdateRow();
            }
        };
    Severity: Major
    Found in app/scripts/window/controllers/main_footer_controller.js and 4 other locations - About 50 mins to fix
    app/scripts/window/controllers/main_footer_controller.js on lines 143..147
    app/scripts/window/controllers/main_footer_controller.js on lines 241..245
    app/scripts/window/controllers/main_footer_controller.js on lines 247..251
    app/scripts/window/controllers/structure_panel_controller.js on lines 316..320

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

    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 5 locations. Consider refactoring.
    Open

        $scope.findSameRows = function() {
            if ($scope.isTable() && $scope.isRowSelection()) {
                anyQueryExecuteService.showFindSameRowsDialog();
            }
        };
    Severity: Major
    Found in app/scripts/window/controllers/main_footer_controller.js and 4 other locations - About 50 mins to fix
    app/scripts/window/controllers/main_footer_controller.js on lines 143..147
    app/scripts/window/controllers/main_footer_controller.js on lines 149..153
    app/scripts/window/controllers/main_footer_controller.js on lines 247..251
    app/scripts/window/controllers/structure_panel_controller.js on lines 316..320

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

    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 5 locations. Consider refactoring.
    Open

        $scope.cloneRow = function() {
            if ($scope.isTable() && $scope.isRowSelection()) {
                targetObjectService.requestCloneRow();
            }
        };
    Severity: Major
    Found in app/scripts/window/controllers/main_footer_controller.js and 4 other locations - About 50 mins to fix
    app/scripts/window/controllers/main_footer_controller.js on lines 149..153
    app/scripts/window/controllers/main_footer_controller.js on lines 241..245
    app/scripts/window/controllers/main_footer_controller.js on lines 247..251
    app/scripts/window/controllers/structure_panel_controller.js on lines 316..320

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

    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

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

            if (!$scope.allowNull) {
                sql += "NOT NULL ";
            } else if ($scope.type == 'TIMESTAMP' && $scope.allowNull) {
                sql += "NULL ";
            }
    Severity: Minor
    Found in app/scripts/window/controllers/add_column_dialog_controller.js and 1 other location - About 50 mins to fix
    app/scripts/window/controllers/edit_column_dialog_controller.js on lines 217..221

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

    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 5 locations. Consider refactoring.
    Open

        $scope.findRowsWithTheValue = function() {
            if ($scope.isTable() && $scope.isRowSelection()) {
                anyQueryExecuteService.showFindRowsWithTheValueDialog();
            }
        };
    Severity: Major
    Found in app/scripts/window/controllers/main_footer_controller.js and 4 other locations - About 50 mins to fix
    app/scripts/window/controllers/main_footer_controller.js on lines 143..147
    app/scripts/window/controllers/main_footer_controller.js on lines 149..153
    app/scripts/window/controllers/main_footer_controller.js on lines 241..245
    app/scripts/window/controllers/structure_panel_controller.js on lines 316..320

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

    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

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

            if (!$scope.allowNull) {
                sql += "NOT NULL ";
            } else if ($scope.type == 'TIMESTAMP' && $scope.allowNull) {
                sql += "NULL ";
            }
    Severity: Minor
    Found in app/scripts/window/controllers/edit_column_dialog_controller.js and 1 other location - About 50 mins to fix
    app/scripts/window/controllers/add_column_dialog_controller.js on lines 108..112

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

    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 5 locations. Consider refactoring.
    Open

        $scope.addColumn = function() {
            if ($scope.isTable() && $scope.isTableSelection()) {
                targetObjectService.showAddColumnDialog();
            }
        };
    Severity: Major
    Found in app/scripts/window/controllers/structure_panel_controller.js and 4 other locations - About 50 mins to fix
    app/scripts/window/controllers/main_footer_controller.js on lines 143..147
    app/scripts/window/controllers/main_footer_controller.js on lines 149..153
    app/scripts/window/controllers/main_footer_controller.js on lines 241..245
    app/scripts/window/controllers/main_footer_controller.js on lines 247..251

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

    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 deeply nested control flow statements.
    Open

                                        if (typeService.isNumeric(typeName)) {
                                            values.push(value);
                                        } else {
                                            values.push("'" + sqlExpressionService.replaceValue(value).replace(/\n/g, "\\n") + "'");
                                        }
    Severity: Major
    Found in app/scripts/window/services/export_all_databases_service.js - About 45 mins to fix

      Function portForwarding has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              portForwarding: function(ssh2AuthType, ssh2Username, ssh2Password, serverHostname, serverPort, privateKey) {
      Severity: Minor
      Found in app/scripts/window/services/ssh2_port_forwarding_service.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                    if (divided[j] !== "ON") {
                                        if (operation === "DELETE") {
                                            onDelete += " " + divided[j];
                                        } else if (operation === "UPDATE") {
                                            onUpdate += " " + divided[j];
        Severity: Major
        Found in app/scripts/window/services/relation_service.js - About 45 mins to fix

          Function loginWithSSL has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  loginWithSSL: function(hostName, portNumber, userName, password, ca, checkCN) {
          Severity: Minor
          Found in app/scripts/window/services/mysql_client_service.js - About 45 mins to fix

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

                        if (table) {
                            if ($scope.selectedTable !== table.name) {
                                $scope.selectedTable = table.name;
                                loadCollations(table.name);
                            }
            Severity: Minor
            Found in app/scripts/window/controllers/information_panel_controller.js and 1 other location - About 40 mins to fix
            app/scripts/window/controllers/relation_panel_controller.js on lines 82..90

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

            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

                        if (table) {
                            if ($scope.tableName !== table.name) {
                                $scope.tableName = table.name;
                                loadRelations(table.name);
                            }
            Severity: Minor
            Found in app/scripts/window/controllers/relation_panel_controller.js and 1 other location - About 40 mins to fix
            app/scripts/window/controllers/information_panel_controller.js on lines 70..77

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

            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 showConfirmDialog has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    message, yesButtonLabel, noButtonLabel, callbackEvent, danger) {
            Severity: Minor
            Found in app/scripts/window/main.js - About 35 mins to fix

              Function drawEntity has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                          var drawEntity = function(model, entity, x, y, element) {
              Severity: Minor
              Found in app/scripts/window/directives/er_diagram.js - About 35 mins to fix
                Severity
                Category
                Status
                Source
                Language