sahat/satellizer

View on GitHub

Showing 300 of 562 total issues

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

  this.Param = function Param(id, type, config, location) {
    var self = this;
    config = unwrapShorthand(config);
    type = getType(config, type, location);
    var arrayMode = getArrayMode();
Severity: Major
Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 2 hrs to fix

    Function link has 71 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          return function link($scope, $element, $attr, ctrls) {
            var childScope;
            var childElement;
            var tabsCtrl = ctrls[0];
            var tabCtrl = ctrls[1];
    Severity: Major
    Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

      Function UrlMatcher has 70 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function UrlMatcher(pattern, config, parentMatcher) {
        config = extend({ params: {} }, isObject(config) ? config : {});
      
        // Find all placeholders and create a compiled pattern, using either classic or curly syntax:
        //   '*' name
      Severity: Major
      Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 2 hrs to fix

        Function $get has 70 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function $get(   $location,   $rootScope,   $injector,   $browser) {
        
            var baseHref = $browser.baseHref(), location = $location.url(), lastPushedUrl;
        
            function appendBasePath(url, isHtml5, absolute) {
        Severity: Major
        Found in examples/ionic/www/lib/ionic/js/angular-ui/angular-ui-router.js - About 2 hrs to fix

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

              controller: ['$scope', '$element', '$attrs', function($scope, $element, $attrs) {
                var _this = this;
          
                var continuous = $scope.$eval($scope.doesContinue) === true;
                var shouldAutoPlay = isDefined($attrs.autoPlay) ? !!$scope.autoPlay : false;
          Severity: Major
          Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

            Function LoginWithFacebook has 94 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func LoginWithFacebook(w http.ResponseWriter, r *http.Request) {
                apiUrl := "https://graph.facebook.com"
                accessTokenPath := "/v2.3/oauth/access_token"
                graphApiPath := "/v2.3/me"
            
            
            Severity: Major
            Found in examples/server/go/oauth2.go - About 2 hrs to fix

              Function transition has 69 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                self.transition = function(enteringHeaderBar, leavingHeaderBar, viewData) {
                  var enteringHeaderBarCtrl = enteringHeaderBar.controller();
                  var transitionFn = $ionicConfig.transitions.navBar[viewData.navBarTransition] || $ionicConfig.transitions.navBar.none;
                  var transitionId = viewData.transitionId;
              
              
              Severity: Major
              Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

                Function LoginWithGoogle has 93 lines of code (exceeds 50 allowed). Consider refactoring.
                Open

                func LoginWithGoogle(w http.ResponseWriter, r *http.Request) {
                
                    accessTokenUrl := "https://accounts.google.com/o/oauth2/token"
                    peopleApiUrl := "https://www.googleapis.com"
                    peopleApiPath := "/plus/v1/people/me/openIdConnect"
                Severity: Major
                Found in examples/server/go/oauth2.go - About 2 hrs to fix

                  Function getLoader has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    function getLoader() {
                      if (!loaderInstance) {
                        loaderInstance = $ionicTemplateLoader.compile({
                          template: LOADING_TPL,
                          appendTo: $ionicBody.get()
                  Severity: Major
                  Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

                    Function init has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            function init() {
                              var listView = listCtrl.listView = new ionic.views.ListView({
                                el: $element[0],
                                listEl: $element.children()[0],
                                scrollEl: scrollCtrl && scrollCtrl.element,
                    Severity: Major
                    Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

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

                        doTouchEnd: function(e, timeStamp) {
                          if (timeStamp instanceof Date) {
                            timeStamp = timeStamp.valueOf();
                          }
                          if (typeof timeStamp !== "number") {
                      Severity: Major
                      Found in examples/ionic/www/lib/ionic/js/ionic.js - About 2 hrs to fix

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

                            handler: function dragGesture(ev, inst) {
                              if (ev.srcEvent.type == 'touchstart' || ev.srcEvent.type == 'touchend') {
                                this.preventedFirstMove = false;
                        
                              } else if (!this.preventedFirstMove && ev.srcEvent.type == 'touchmove') {
                        Severity: Major
                        Found in examples/ionic/www/lib/ionic/js/ionic.js - About 2 hrs to fix

                          Method from_auth has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                          Open

                            def self.from_auth(params, current_user)
                              params = params.smash.with_indifferent_access
                              authorization = Authorization.find_or_initialize_by(provider: params[:provider], uid: params[:uid])
                              if authorization.persisted?
                                if current_user
                          Severity: Minor
                          Found in examples/server/ruby/app/models/user.rb - About 2 hrs to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function createPopup has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            function createPopup(options) {
                              options = extend({
                                scope: null,
                                title: '',
                                buttons: []
                          Severity: Major
                          Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

                            Function $get has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                $get: ['$q', function($q) {
                                  var self = {
                            
                                    /**
                                     * @ngdoc method
                            Severity: Major
                            Found in examples/ionic/www/lib/ionic/js/ionic-angular.js - About 2 hrs to fix

                              Function OAuth1 has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  var OAuth1 = (function () {
                                      function OAuth1($http, $window, SatellizerConfig, SatellizerPopup) {
                                          this.$http = $http;
                                          this.$window = $window;
                                          this.SatellizerConfig = SatellizerConfig;
                              Severity: Major
                              Found in examples/ionic/www/lib/satellizer/dist/satellizer.js - About 2 hrs to fix

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

                                  __stepThroughDeceleration: function(render) {
                                    var self = this;
                                
                                
                                    //
                                Severity: Major
                                Found in examples/ionic/www/lib/ionic/js/ionic.js - About 2 hrs to fix

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

                                    ionic.DelegateService = function(methodNames) {
                                  
                                      if (methodNames.indexOf('$getByHandle') > -1) {
                                        throw new Error("Method '$getByHandle' is implicitly added to each delegate service. Do not list it as a method.");
                                      }
                                  Severity: Major
                                  Found in examples/ionic/www/lib/ionic/js/ionic.js - About 2 hrs to fix

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

                                        var OAuth = (function () {
                                            function OAuth($http, $window, $timeout, $q, SatellizerConfig, SatellizerPopup, SatellizerStorage, SatellizerShared, SatellizerOAuth1, SatellizerOAuth2) {
                                                this.$http = $http;
                                                this.$window = $window;
                                                this.$timeout = $timeout;
                                    Severity: Major
                                    Found in examples/ionic/www/lib/satellizer/dist/satellizer.js - About 2 hrs to fix

                                      Function __repositionScrollbars has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        __repositionScrollbars: function() {
                                          var self = this,
                                              heightScale, widthScale,
                                              widthDiff, heightDiff,
                                              x, y,
                                      Severity: Major
                                      Found in examples/ionic/www/lib/ionic/js/ionic.js - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language