yadaguru/yadaguru-app

View on GitHub

Showing 14 of 29 total issues

Function utilService has 99 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  var utilService = function() {

    var utils = {};

    /**
Severity: Major
Found in src/services/utilsService.js - About 3 hrs to fix

    Function controller has 98 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            function ($scope, $moment, helpService, yadaApi, modalService, localStorage, errorService, authService) {
    
              $scope.obStep = 1;
              $scope.minDate = $moment().toDate();
              $scope.initDate = $moment('20160201', 'YYYYMMDD').toDate();
    Severity: Major
    Found in src/directives/onboarding.js - About 3 hrs to fix

      Function routeResolver has 74 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        var routeResolver = function() {
      
          this.$get = function() {
            return this;
          };
      Severity: Major
      Found in src/services/routeResolverProvider.js - About 2 hrs to fix

        Function googleCalendarService has 74 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          var googleCalendarService = function(Utils, $rootScope) {
        
            var CLIENT_ID = '240339457257-tqhtiqq9irs42ite1tmp1gjii23hg3uo.apps.googleusercontent.com';
            var SCOPES = ['https://www.googleapis.com/auth/calendar'];
            var calendarId;
        Severity: Major
        Found in src/services/googleCalendarService.js - About 2 hrs to fix

          Function apiService has 52 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            var apiService = function($http, constants, $q, authService) {
              var yadaAPI = {};
          
              yadaAPI.reminders = {};
              var apiRoute = constants.HOSTNAME + constants.API_ROUTE;
          Severity: Major
          Found in src/services/apiService.js - About 2 hrs to fix

            Function route has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                this.route = (function(routeConfig) {
            
                  var resolve = function(url, baseName, path, controllerAs, secure) {
                      if (!path) {
                        path = '';
            Severity: Minor
            Found in src/services/routeResolverProvider.js - About 2 hrs to fix

              Function iCalService has 44 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                var iCalService = function(SaveAs) {
                  var iCalFactory = function() {
                    // Ideally if the browser is MSIE < 10 the iCal save button shouldn't be shown
                    if (navigator.userAgent.indexOf('MSIE') > -1 &&
                        navigator.userAgent.indexOf('MSIE 10') === -1) {
              Severity: Minor
              Found in src/services/iCalService.js - About 1 hr to fix

                Function showModal has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      modalFactory.showModal = function(content, options) {
                
                        options = options || {};
                
                        var defaultController = function($scope, $modalInstance, contentItem) {
                Severity: Minor
                Found in src/services/modalService.js - About 1 hr to fix

                  Function addCalendarEvents has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function addCalendarEvents(events, school, dueDate, callback) {
                        // authorizes YadaGuru with user's Google account
                        gapi.auth.authorize({
                          'client_id': CLIENT_ID,
                          'scope': SCOPES,
                  Severity: Minor
                  Found in src/services/googleCalendarService.js - About 1 hr to fix

                    Function resolve has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          var resolve = function(url, baseName, path, controllerAs, secure) {
                              if (!path) {
                                path = '';
                              }
                    
                    
                    Severity: Minor
                    Found in src/services/routeResolverProvider.js - About 1 hr to fix

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

                          utils.groupBy = function(arrayOfObjects, propToGroupBy) {
                            var groupArray = [],
                                match;
                      
                            var newGroup = function(initObj, groupProp) {
                      Severity: Minor
                      Found in src/services/utilsService.js - About 1 hr to fix

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

                                function ($scope, $moment, helpService, yadaApi, modalService, localStorage, errorService, authService) {
                        Severity: Major
                        Found in src/directives/onboarding.js - About 1 hr to fix

                          Avoid deeply nested control flow statements.
                          Open

                                        if (groupArray[j].name === arrayOfObjects[i][propToGroupBy]) {
                                          groupArray[j].members.push(arrayOfObjects[i]);
                                          match = true;
                                          break;
                                        }
                          Severity: Major
                          Found in src/services/utilsService.js - About 45 mins to fix

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

                                  var resolve = function(url, baseName, path, controllerAs, secure) {
                            Severity: Minor
                            Found in src/services/routeResolverProvider.js - About 35 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language