yoichiro/chrome_mysql_admin

View on GitHub

Showing 375 of 375 total issues

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

            var drawConnection = function(connection, element) {
                var canvas = getCanvas(element);
                var source = connection.getSource();
                var sourceBorderLayer = canvas.getLayer(
                    source.getEntity().getName() + "-border");
Severity: Minor
Found in app/scripts/window/directives/er_diagram.js - About 1 hr to fix

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

        var exportAllDatabases = function() {
            var now = $filter("date")(new Date(), "yyyyMMddHHmmss");
            var filename = "dump_" + now + ".sql";
            var options = {
                type: "saveFile",
    Severity: Minor
    Found in app/scripts/window/controllers/database_panel_controller.js - About 1 hr to fix

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

          this.encode = function(output_byte_stream, code_point_pointer) {
            var code_point = code_point_pointer.get();
            if (code_point === EOF_code_point) {
              return EOF_byte;
            }
      Severity: Minor
      Found in app/scripts/lib/encoding.js - About 1 hr to fix

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

                login: function(hostName, portNumber, userName, password) {
                    $rootScope.showMainStatusMessage("Logging in to MySQL server...");
                    $rootScope.showProgressBar();
                    var deferred = $q.defer();
                    $rootScope.notifyExecutingQuery("Logging in to MySQL server.");
        Severity: Minor
        Found in app/scripts/window/services/mysql_client_service.js - About 1 hr to fix

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

                  exportAllDatabases: function() {
                      var deferred = $q.defer();
                      var header = createHeader();
                      var footer = createFooter();
                      getDatabases().then(function(databases) {
          Severity: Minor
          Found in app/scripts/window/services/export_all_databases_service.js - About 1 hr to fix

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

                $scope.canTruncate = function() {
                    var table = targetObjectService.getTable();
                    if (table) {
                        return table.type === TableTypes.BASE_TABLE;
                    } else {
            app/scripts/window/controllers/main_footer_controller.js on lines 128..135
            app/scripts/window/controllers/structure_panel_controller.js on lines 291..298

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

            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 (tables.length === 0) {
                        $("#findRowsWithTheValueDialog").modal("hide");
                        anyQueryExecuteService.showAndExecuteQueryPanel(
                            sqls.join(";\n"),
                            $scope.removeEmptyResult === "true");
            app/scripts/window/controllers/find_same_rows_dialog_controller.js on lines 63..69

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

            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 (tables.length === 0) {
                        $("#findSameRowsDialog").modal("hide");
                        anyQueryExecuteService.showAndExecuteQueryPanel(
                            sqls.join(";\n"),
                            $scope.removeEmptyResult === "true");
            app/scripts/window/controllers/find_rows_with_the_value_dialog_controller.js on lines 71..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 59.

            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

                $scope.isTable = function() {
                    var table = targetObjectService.getTable();
                    if (table) {
                        return table.type === TableTypes.BASE_TABLE;
                    } else {
            app/scripts/window/controllers/database_object_list_controller.js on lines 195..202
            app/scripts/window/controllers/main_footer_controller.js on lines 128..135

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

            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

                $scope.isTable = function() {
                    var table = targetObjectService.getTable();
                    if (table) {
                        return table.type === TableTypes.BASE_TABLE;
                    } else {
            Severity: Major
            Found in app/scripts/window/controllers/main_footer_controller.js and 2 other locations - About 1 hr to fix
            app/scripts/window/controllers/database_object_list_controller.js on lines 195..202
            app/scripts/window/controllers/structure_panel_controller.js on lines 291..298

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

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

                this.encode = function(output_byte_stream, code_point_pointer) {
                  var code_point = code_point_pointer.get();
                  if (code_point === EOF_code_point) {
                    return EOF_byte;
                  }
            Severity: Minor
            Found in app/scripts/lib/encoding.js - About 1 hr to fix

              Function ShiftJISEncoder has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function ShiftJISEncoder(options) {
                  var fatal = options.fatal;
                  /**
                   * @param {ByteOutputStream} output_byte_stream Output byte stream.
                   * @param {CodePointInputStream} code_point_pointer Input stream.
              Severity: Minor
              Found in app/scripts/lib/encoding.js - About 1 hr to fix

                Function getStoredPositionCalculator has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                            var getStoredPositionCalculator = function(dimensions) {
                                return (function(dimensions) {
                                    var offsetX = 30;
                                    var offsetY = 30;
                                    var existsPosition = false;
                Severity: Minor
                Found in app/scripts/window/directives/er_diagram.js - About 1 hr to fix

                  Function doTestConnectToMySQL has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      var doTestConnectToMySQL = function(hostName, portNumber) {
                          if (isUseSSLConnection()) {
                              mySQLClientService.loginWithSSL(
                                  hostName,
                                  Number(portNumber),
                  Severity: Minor
                  Found in app/scripts/window/controllers/login_form_controller.js - About 1 hr to fix

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

                            if ($scope.type === "SET" || $scope.type === "ENUM") {
                                if ($scope.setEnumValues.length === 0) {
                                    $scope.errorMessage = "SET/ENUM type column must have one or more values.";
                                    return;
                                }
                    app/scripts/window/controllers/add_column_dialog_controller.js on lines 77..82

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

                    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") {
                                if ($scope.setEnumValues.length === 0) {
                                    $scope.errorMessage = "SET/ENUM type column must have one or more values.";
                                    return;
                                }
                    app/scripts/window/controllers/edit_column_dialog_controller.js on lines 186..191

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

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

                        var initializeRowsGrid = function() {
                            $scope.sortOptions = {
                                fields: [],
                                directions: [],
                                columns: []
                    Severity: Minor
                    Found in app/scripts/window/controllers/rows_panel_controller.js - About 1 hr to fix

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

                          var onShowDialog = function() {
                              resetErrorMessage();
                              $scope.columnType = ONLY_SAME_COLUMN_TYPE;
                              $scope.removeEmptyResult = "true";
                              $scope.matchingRule = MATCHING_RULE_FULL;

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

                                    var getShortPosition = function(source, target) {
                                        var source1 = source.x;
                                        var source2 = source.x + source.width;
                                        var target1 = target.x;
                                        var target2 = target.x + target.width;
                        Severity: Minor
                        Found in app/scripts/window/directives/er_diagram.js - About 1 hr to fix

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

                              var loadStructure = function(tables, sqls) {
                                  if (tables.length === 0) {
                                      $("#findRowsWithTheValueDialog").modal("hide");
                                      anyQueryExecuteService.showAndExecuteQueryPanel(
                                          sqls.join(";\n"),
                            Severity
                            Category
                            Status
                            Source
                            Language