eHealthAfrica/LMIS-Chrome

View on GitHub

Showing 52 of 150 total issues

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

      function getByUUID(uuid) {
        var deferred = $q.defer();
        storageService.find(storageService.INVENTORY, uuid).then(function (data) {

          var inventoryLine = data;
Severity: Minor
Found in app/scripts/services/inventoryfactory.js - About 1 hr to fix

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

                  controller: function($q, $log, $scope, i18n, config, pouchdb, localDocs, growl) {
    Severity: Major
    Found in app/scripts/controllers/stock-count-sync-stat.js - About 1 hr to fix

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

          controller: function ($stateParams, $state, $scope, surveyFactory, growl, appConfig, i18n, alertFactory) {
      Severity: Major
      Found in app/scripts/controllers/survey.js - About 1 hr to fix

        Function controller has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                    controller: function($scope, $window, i18n, appConfigService, deviceInfoFactory, backgroundSyncService, analyticsSyncService) {
        Severity: Major
        Found in app/scripts/controllers/index.js - About 50 mins to fix

          Function controller has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                controller: function(appConfig, $state, $scope, isStockCountReminderDue, $rootScope, reminderFactory, i18n) {
          Severity: Major
          Found in app/scripts/controllers/home.js - About 50 mins to fix

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

                          var getProductTypeCounts = function($q, $log, inventoryRulesFactory, productTypeFactory, appConfig, appConfigService) {
            Severity: Minor
            Found in app/scripts/controllers/home.js - About 45 mins to fix

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

                      controller: function($scope, settings, settingsService, growl, i18n, utility) {
              Severity: Minor
              Found in app/scripts/controllers/home.js - About 45 mins to fix

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

                          aggregatedInventory: function($q, $log, appConfig, inventoryFactory, dashboardfactory, settings) {
                Severity: Minor
                Found in app/scripts/controllers/home.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                  for(var j in wasteCount.reason[i]){
                                    if(wasteCount.reason[i][j] !== 0 && wasteCount.reason[i][j] !== ''){
                                      arr.push(
                                        {
                                          header: false,
                  Severity: Major
                  Found in app/scripts/services/waste-count-factory.js - About 45 mins to fix

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

                                controller: function($stateParams, i18n, growl, alertFactory, $scope) {
                    Severity: Minor
                    Found in app/scripts/controllers/home.js - About 35 mins to fix

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

                                  controller: function($scope, $log, dashboardfactory, keys, aggregatedInventory) {
                      Severity: Minor
                      Found in app/scripts/controllers/home.js - About 35 mins to fix

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

                                      controller: function($log, $scope, localDocs, config, pouchdb) {
                        Severity: Minor
                        Found in app/scripts/controllers/stock-count-sync-stat.js - About 35 mins to fix
                          Severity
                          Category
                          Status
                          Source
                          Language