yoichiro/chrome_mysql_admin

View on GitHub

Showing 375 of 375 total issues

Function HZGB2312Decoder has 65 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function HZGB2312Decoder(options) {
    var fatal = options.fatal;
    var /** @type {boolean} */ hzgb2312 = false,
        /** @type {number} */ hzgb2312_lead = 0x00;
    /**
Severity: Major
Found in app/scripts/lib/encoding.js - About 2 hrs to fix

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

            mySQLClientService.query(sql).then(function(result) {
                if (result.hasResultsetRows) {
                    $scope.fatalErrorOccurred("Changing table engine failed.");
                } else {
                    loadCollations(targetObjectService.getTable().name);
    app/scripts/window/controllers/information_panel_controller.js on lines 151..159

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

    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

            mySQLClientService.query(sql).then(function(result) {
                if (result.hasResultsetRows) {
                    $scope.fatalErrorOccurred("Changing table character set and collation failed.");
                } else {
                    loadCollations(targetObjectService.getTable().name);
    app/scripts/window/controllers/information_panel_controller.js on lines 166..174

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

    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

        $scope.onChangeValueType = function(columnName) {
            var valueType = $scope.valueTypes[columnName];
            if (valueType !== ValueTypes.NULL) {
                var value = $scope.values[columnName];
                if (!value) {
    app/scripts/window/controllers/insert_row_dialog_controller.js on lines 105..113

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

    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

        $scope.onChangeValueType = function(columnName) {
            var valueType = $scope.valueTypes[columnName];
            if (valueType !== ValueTypes.NULL) {
                var value = $scope.values[columnName];
                if (!value) {
    app/scripts/window/controllers/update_row_dialog_controller.js on lines 61..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 86.

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

      function EUCJPDecoder(options) {
        var fatal = options.fatal;
        var /** @type {number} */ eucjp_first = 0x00,
            /** @type {number} */ eucjp_second = 0x00;
        /**
    Severity: Major
    Found in app/scripts/lib/encoding.js - About 2 hrs to fix

      Function decode has 62 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          this.decode = function(byte_pointer) {
            var bite = byte_pointer.get();
            if (bite === EOF_byte && hzgb2312_lead === 0x00) {
              return EOF_code_point;
            }
      Severity: Major
      Found in app/scripts/lib/encoding.js - About 2 hrs to fix

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

                getAll: function() {
                    var deferred = $q.defer();
                    chrome.storage.local.get("knownHosts", function(items) {
                        var knownHosts = items.knownHosts || {};
                        deferred.resolve(knownHosts);
        Severity: Major
        Found in app/scripts/window/services/ssh2_known_host_service.js and 1 other location - About 2 hrs to fix
        app/scripts/window/services/favorite_service.js on lines 60..67

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

        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

                getAll: function() {
                    var deferred = $q.defer();
                    chrome.storage.local.get("favorites", function(items) {
                        var favorites = items.favorites || {};
                        deferred.resolve(favorites);
        Severity: Major
        Found in app/scripts/window/services/favorite_service.js and 1 other location - About 2 hrs to fix
        app/scripts/window/services/ssh2_known_host_service.js on lines 59..66

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

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

            this.decode = function(byte_pointer) {
              var bite = byte_pointer.get();
              if (bite === EOF_byte) {
                if (eucjp_first === 0x00 && eucjp_second === 0x00) {
                  return EOF_code_point;
        Severity: Major
        Found in app/scripts/lib/encoding.js - About 2 hrs to fix

          Function createWindow has 60 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function createWindow() {
              chrome.storage.local.get("windowSize", function(items) {
                  var params = {};
                  if (items.windowSize) {
                      var windowSize = items.windowSize;
          Severity: Major
          Found in app/scripts/background.js - About 2 hrs to fix

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

                $scope.addSetEnumValue = function() {
                    if ($scope.setEnumValue && $scope.setEnumValues.indexOf($scope.setEnumValue) === -1) {
                        $scope.setEnumValues.push($scope.setEnumValue);
                    }
                    $scope.setEnumValue = "";
            app/scripts/window/controllers/add_column_dialog_controller.js on lines 164..169

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

            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

                $scope.addSetEnumValue = function() {
                    if ($scope.setEnumValue && $scope.setEnumValues.indexOf($scope.setEnumValue) === -1) {
                        $scope.setEnumValues.push($scope.setEnumValue);
                    }
                    $scope.setEnumValue = "";
            app/scripts/window/controllers/edit_column_dialog_controller.js on lines 272..277

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

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

                var _doQuery = function(task, showProgressBar) {
                    if (showProgressBar) {
                        $rootScope.showMainStatusMessage("Executing query...");
                        $rootScope.showProgressBar();
                    }
            Severity: Major
            Found in app/scripts/window/services/mysql_client_service.js - About 2 hrs to fix

              Function Big5Decoder has 59 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function Big5Decoder(options) {
                  var fatal = options.fatal;
                  var /** @type {number} */ big5_lead = 0x00,
                      /** @type {?number} */ big5_pending = null;
              
              
              Severity: Major
              Found in app/scripts/lib/encoding.js - About 2 hrs to fix

                Function UTF8Decoder has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function UTF8Decoder(options) {
                    var fatal = options.fatal;
                    var /** @type {number} */ utf8_code_point = 0,
                        /** @type {number} */ utf8_bytes_needed = 0,
                        /** @type {number} */ utf8_bytes_seen = 0,
                Severity: Major
                Found in app/scripts/lib/encoding.js - About 2 hrs to fix

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

                          mySQLClient.getDatabases(function(databases) {
                              $rootScope.hideProgressBar();
                              $rootScope.showMainStatusMessage("Retrieved database list.");
                              queryQueue.shift();
                              var remaining = queryQueue.length;
                  Severity: Major
                  Found in app/scripts/window/services/mysql_client_service.js and 1 other location - About 2 hrs to fix
                  app/scripts/window/services/mysql_client_service.js on lines 166..175

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

                  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

                          mySQLClient.getStatistics(function(statistics) {
                              $rootScope.hideProgressBar();
                              $rootScope.showMainStatusMessage("Retrieved statistics.");
                              queryQueue.shift();
                              var remaining = queryQueue.length;
                  Severity: Major
                  Found in app/scripts/window/services/mysql_client_service.js and 1 other location - About 2 hrs to fix
                  app/scripts/window/services/mysql_client_service.js on lines 138..147

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

                  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

                  File edit_column_dialog_controller.js has 262 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  chromeMyAdmin.controller("EditColumnDialogController", function(
                      $scope,
                      Events,
                      mySQLClientService,
                      $q,
                  Severity: Minor
                  Found in app/scripts/window/controllers/edit_column_dialog_controller.js - About 2 hrs to fix

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

                        var loadCharacterSet = function() {
                            mySQLQueryService.showCharacterSet().then(function(result) {
                                $scope.characterSets = result.resultsetRows;
                                $scope.characterSet = "utf8";
                            }, function(reason) {
                    app/scripts/window/controllers/create_table_dialog_controller.js on lines 13..20

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

                    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

                    Severity
                    Category
                    Status
                    Source
                    Language