yoichiro/chrome_mysql_admin

View on GitHub

Showing 375 of 375 total issues

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"),

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

                    chrome.storage.local.set({favorites: favorites}, function() {
                        $rootScope.$broadcast(Events.FAVORITES_CHANGED, favorites);
                        deferred.resolve();
                    });
    Severity: Major
    Found in app/scripts/window/services/favorite_service.js and 1 other location - About 1 hr to fix
    app/scripts/window/services/favorite_service.js on lines 45..48

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

    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

                    chrome.storage.local.set({favorites: favorites}, function() {
                        $rootScope.$broadcast(Events.FAVORITES_CHANGED, favorites);
                        deferred.resolve();
                    });
    Severity: Major
    Found in app/scripts/window/services/favorite_service.js and 1 other location - About 1 hr to fix
    app/scripts/window/services/favorite_service.js on lines 73..76

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

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

      function EUCJPEncoder(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 getBasicPositionCalculator has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  var getBasicPositionCalculator = function(model) {
                      return (function(model) {
                          var startX = 30;
                          var startY = 30;
                          var offsetX = startX;
      Severity: Minor
      Found in app/scripts/window/directives/er_diagram.js - About 1 hr to fix

        Function createSelectedQueryResultBlob has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            var createSelectedQueryResultBlob = function() {
                var lines = [];
                var queryResult = querySelectionService.getQueryResult();
                var columnDefinitions = queryResult.result.columnDefinitions;
                var resultsetRows = queryResult.result.resultsetRows;
        Severity: Minor
        Found in app/scripts/window/controllers/query_panel_controller.js - About 1 hr to fix

          Function createInsertStatement has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  createInsertStatement: function(table, values, valueTypes) {
                      var targetColumns = [];
                      var targetValues = [];
                      angular.forEach(values, function(value, columnName) {
                          var valueType = valueTypes[columnName];
          Severity: Minor
          Found in app/scripts/window/services/sql_expression_service.js - About 1 hr to fix

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

                    if (typeService.isString($scope.type)) {
                        sql += "CHARACTER SET " + $scope.characterSet + " ";
                        sql += "COLLATE " + $scope.collation + " ";
                        if ($scope.binary) {
                            sql += "BINARY ";
            app/scripts/window/controllers/add_column_dialog_controller.js on lines 93..106

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

            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 (typeService.isString($scope.type)) {
                        if ($scope.binary) {
                            sql += "BINARY ";
                        }
                        sql += "CHARACTER SET " + $scope.characterSet + " ";
            app/scripts/window/controllers/edit_column_dialog_controller.js on lines 203..216

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

            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

                    mySQLQueryService.showFullColumns(tableName).then(function(result) {
                        deferred.resolve({
                            columnDefinitions: result.columnDefinitions,
                            resultsetRows: result.resultsetRows
                        });
            app/scripts/window/controllers/add_relation_dialog_controller.js on lines 76..83

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

            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

                    mySQLQueryService.showTables().then(function(result) {
                        deferred.resolve({
                            columnDefinitions: result.columnDefinitions,
                            resultsetRows: result.resultsetRows
                        });
            app/scripts/window/controllers/add_relation_dialog_controller.js on lines 89..96

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

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

                    copyRow: function(queryResult, row) {
                        var columnDefinitions = queryResult.columnDefinitions;
                        var resultsetRows = queryResult.resultsetRows;
                        var values = [];
                        angular.forEach(columnDefinitions, function(column, index) {
            Severity: Minor
            Found in app/scripts/window/services/clipboard_service.js - About 1 hr to fix

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

                  var assignEventHandlers = function() {
                      $scope.$on(Events.CONNECTION_CHANGED, function(event, data) {
                          onConnectionChanged();
                      });
                      $scope.$on(Events.DATABASE_CHANGED, function(event, database) {

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

                    var cps = (/** @return {Array.<number>} Code points. */function() {
                      /** @type {Array.<number>} */
                      var cps = [];
                      // Based on http://www.w3.org/TR/WebIDL/#idl-DOMString
                      var i = 0, n = string.length;
                Severity: Minor
                Found in app/scripts/lib/encoding.js - About 1 hr to fix

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

                    function EUCKREncoder(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 doShowQueryResult has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        var doShowQueryResult = function(index) {
                            resetQueryResultGrid();
                            var queryResult = $scope.queryResults[index];
                            querySelectionService.setQueryResult(queryResult);
                            $scope.selectedQuery = queryResult.query;
                    Severity: Minor
                    Found in app/scripts/window/controllers/query_panel_controller.js - About 1 hr to fix

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

                        function UTF16Encoder(utf16_be, 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 encode has 26 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 assignEventHandlers has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              var assignEventHandlers = function() {
                                  $scope.$on(Events.CONNECTION_CHANGED, function(event, data) {
                                      onConnectionChanged();
                                  });
                                  $scope.$on(Events.MODE_CHANGED, function(event, mode) {
                          Severity: Minor
                          Found in app/scripts/window/controllers/query_panel_controller.js - About 1 hr to fix

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

                                var doOpen = function(activeTab) {
                                    configurationService.getDatabaseInfoAutoUpdateSpan().then(function(span) {
                                        $scope.databaseInfoAutoUpdateSpan = span / 1000;
                                        return configurationService.getRowCountPerPageInRowsPanel();
                                    }).then(function(rowCount) {
                            Severity: Minor
                            Found in app/scripts/window/controllers/configuration_dialog_controller.js - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language