yoichiro/chrome_mysql_admin

View on GitHub

Showing 375 of 375 total issues

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

    var onShowDialog = function(table, columnDefs, columnStructure) {
        resetErrorMessage();
        $scope.selectedTable = table;
        $scope.originalColumnDefs = columnDefs;
        $scope.originalColumnStructure = columnStructure;
Severity: Minor
Found in app/scripts/window/controllers/edit_column_dialog_controller.js - About 1 hr to fix

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

        var executeProcedure = function(selectedRoutine) {
            if (selectedRoutine.entity.ROUTINE_TYPE !== "PROCEDURE") {
                return;
            }
            getRoutineCode(selectedRoutine).then(function(routineCode) {

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

        function UTF8Encoder(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

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

                        if ($scope.graphType === GraphTypes.NORMAL) {
                            data = $scope.normalData[$scope.statusName];
                        } else {
                            data = $scope.deltaData[$scope.statusName];
                        }
        Severity: Major
        Found in app/scripts/window/directives/status_graph.js and 1 other location - About 1 hr to fix
        app/scripts/window/directives/status_graph.js on lines 51..55

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

        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 (value === null) {
                        $scope.valueTypes[column.name] = ValueTypes.NULL;
                    } else {
                        $scope.valueTypes[column.name] = ValueTypes.VALUE;
                    }
        app/scripts/window/controllers/insert_row_dialog_controller.js on lines 35..39

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

        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 (value === null) {
                        $scope.valueTypes[column.name] = ValueTypes.NULL;
                    } else {
                        $scope.valueTypes[column.name] = ValueTypes.VALUE;
                    }
        app/scripts/window/controllers/update_row_dialog_controller.js on lines 27..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 61.

        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 ($scope.graphType === GraphTypes.NORMAL) {
                            data = scope.normalData[scope.statusName];
                        } else {
                            data = scope.deltaData[scope.statusName];
                        }
        Severity: Major
        Found in app/scripts/window/directives/status_graph.js and 1 other location - About 1 hr to fix
        app/scripts/window/directives/status_graph.js on lines 65..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 61.

        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

                    mySQLClientService.loginWithSSL(
                        hostName,
                        Number(portNumber),
                        $scope.userName,
                        $scope.password,
        Severity: Major
        Found in app/scripts/window/controllers/login_form_controller.js and 1 other location - About 1 hr to fix
        app/scripts/window/controllers/login_form_controller.js on lines 114..125

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

        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

                    mySQLClientService.login(
                        hostName,
                        Number(portNumber),
                        $scope.userName,
                        $scope.password
        Severity: Major
        Found in app/scripts/window/controllers/login_form_controller.js and 1 other location - About 1 hr to fix
        app/scripts/window/controllers/login_form_controller.js on lines 99..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 61.

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

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

          Function GBKEncoder has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function GBKEncoder(gb18030, 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 loadTables has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var loadTables = function(databases, index, deferred) {
                    if (index === databases.length) {
                        deferred.resolve(databases);
                    } else {
                        var database = databases[index];
            Severity: Minor
            Found in app/scripts/window/services/export_all_databases_service.js - About 1 hr to fix

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

                  $scope.confirmDeleteSelectedRelation = function() {
                      if ($scope.isTable() && $scope.isRelationSelection()) {
                          $scope.showConfirmDialog(
                              "Once deleted data will be undone. Would you really like to delete the selected relation from the database?",
                              "Yes",
              Severity: Major
              Found in app/scripts/window/controllers/main_footer_controller.js and 3 other locations - About 1 hr to fix
              app/scripts/window/controllers/main_footer_controller.js on lines 112..122
              app/scripts/window/controllers/structure_panel_controller.js on lines 304..314
              app/scripts/window/controllers/structure_panel_controller.js on lines 334..344

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

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

                  $scope.confirmDeleteSelectedColumn = function() {
                      if ($scope.isTable() && $scope.isColumnSelection()) {
                          $scope.showConfirmDialog(
                              "Once deleted data will be undone. Would you really like to delete the selected column?",
                              "Yes",
              app/scripts/window/controllers/main_footer_controller.js on lines 112..122
              app/scripts/window/controllers/main_footer_controller.js on lines 185..195
              app/scripts/window/controllers/structure_panel_controller.js on lines 334..344

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

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

                  $scope.confirmDeleteSelectedRow = function() {
                      if ($scope.isTable() && $scope.isRowSelection()) {
                          $scope.showConfirmDialog(
                              "Once deleted data will be undone. Would you really like to delete the selected row from MySQL server?",
                              "Yes",
              Severity: Major
              Found in app/scripts/window/controllers/main_footer_controller.js and 3 other locations - About 1 hr to fix
              app/scripts/window/controllers/main_footer_controller.js on lines 185..195
              app/scripts/window/controllers/structure_panel_controller.js on lines 304..314
              app/scripts/window/controllers/structure_panel_controller.js on lines 334..344

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

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

                  $scope.confirmDeleteSelectedIndex = function() {
                      if ($scope.isTable() && $scope.isIndexSelection()) {
                          $scope.showConfirmDialog(
                              "Once deleted data will be undone. Would you really like to delete the selected index?",
                              "Yes",
              app/scripts/window/controllers/main_footer_controller.js on lines 112..122
              app/scripts/window/controllers/main_footer_controller.js on lines 185..195
              app/scripts/window/controllers/structure_panel_controller.js on lines 304..314

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

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

                  var doExecuteQuery = function(queries, removeEmptyResult) {
                      if (queries.length === 0) {
                          doShowQueryResult(0);
                          $scope.notifyQueryExecuted();
                          return;
              Severity: Minor
              Found in app/scripts/window/controllers/query_panel_controller.js - About 1 hr to fix

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

                    var doConnectToMySQL = 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

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

                          check: function(hostName, port, method, fingerprint) {
                              lastChecked = {
                                  hostName: hostName,
                                  port: port,
                                  method: method,
                  Severity: Minor
                  Found in app/scripts/window/services/ssh2_known_host_service.js - About 1 hr to fix

                    Function encode has 31 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
                      Severity
                      Category
                      Status
                      Source
                      Language