devstaff-crete/DevStaff-Heraklion

View on GitHub

Showing 295 of 1,637 total issues

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

    function getIndices( slide ) {

        // By default, return the current indices
        var h = indexh,
            v = indexv,
Severity: Minor
Found in meetups/meetup06-MobileDev/x-platform/js/reveal.js - About 1 hr to fix

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

                var promise = $http(httpConfig).then(function(response) {
                  var data = response.data,
                    promise = value.$promise;
    
                  if (data) {

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

        provider.transitions.views.ios = function(enteringEle, leavingEle, direction, shouldAnimate) {
      
          function setStyles(ele, opacity, x, boxShadowOpacity) {
            var css = {};
            css[ionic.CSS.TRANSITION_DURATION] = d.shouldAnimate ? '' : 0;
      Severity: Minor
      Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 1 hr to fix

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

            collectEventData: function collectEventData(element, eventType, touches, ev) {
        
              // find out pointerType
              var pointerType = ionic.Gestures.POINTER_TOUCH;
              if(ev.type.match(/mouse/) || ionic.Gestures.PointerEvent.matchType(ionic.Gestures.POINTER_MOUSE, ev)) {
        Severity: Minor
        Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic.js - About 1 hr to fix

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

              self.touchMove = function(e) {
                if (self.options.freeze || !self.__isDown ||
                  (!self.__isDown && e.defaultPrevented) ||
                  (e.target.tagName === 'TEXTAREA' && e.target.parentElement.querySelector(':focus')) ) {
                  return;
          Severity: Minor
          Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic.js - About 1 hr to fix

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

              function getRenderer(attrs, scope) {
                var statics = function() {
                  return {
                    enter: function (element, target, cb) { target.after(element); cb(); },
                    leave: function (element, cb) { element.remove(); cb(); }

              Consider simplifying this complex logical expression.
              Open

                          if( autoSlide && !autoSlidePaused && !isPaused() && !isOverview() && ( !Reveal.isLastSlide() || availableFragments().next || config.loop === true ) ) {
                              autoSlideTimeout = setTimeout( navigateNext, autoSlide );
                              autoSlideStartTime = Date.now();
                          }
              Severity: Major
              Found in meetups/meetup06-MobileDev/x-platform/js/reveal.js - About 1 hr to fix

                Consider simplifying this complex logical expression.
                Open

                          if (nativeScrolling) {
                            // use native scrolling
                            $element.addClass('overflow-scroll');
                
                            scrollViewOptions = {
                Severity: Major
                Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                          if( activeElementIsCE || activeElementIsInput || (event.shiftKey && event.keyCode !== 32) || event.altKey || event.ctrlKey || event.metaKey ) return;
                  Severity: Major
                  Found in meetups/meetup06-MobileDev/x-platform/js/reveal.js - About 1 hr to fix

                    Consider simplifying this complex logical expression.
                    Open

                          } else if (currentView && currentView.historyId !== historyId &&
                                    hist.cursor > -1 && hist.stack.length > 0 && hist.cursor < hist.stack.length &&
                                    hist.stack[hist.cursor].stateId === currentStateId) {
                            // they just changed to a different history and the history already has views in it
                            var switchToView = hist.stack[hist.cursor];
                    Severity: Major
                    Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 1 hr to fix

                      Function RevealNotes has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                      Open

                      var RevealNotes = (function() {
                      
                          function openNotes() {
                              var jsFileLocation = document.querySelector('script[src$="notes.js"]').src;  // this js file path
                              jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, '');   // the js folder path
                      Severity: Minor
                      Found in meetups/meetup06-MobileDev/x-platform/plugin/notes/notes.js - About 55 mins 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 updatePositions has 7 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        self.updatePositions = function(titleEle, updateTitleLeft, updateTitleRight, buttonsLeft, buttonsRight, updateCss, showPreviousTitle) {
                      Severity: Major
                      Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 50 mins to fix

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

                               function($window,   $$jqLite,   $$AnimateRunner,   $timeout,
                                        $document,   $sniffer,   $$rAFScheduler) {

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

                          function CollectionRepeatDirective($ionicCollectionManager, $parse, $window, $$rAF, $rootScope, $timeout) {
                          Severity: Minor
                          Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                if( touch.captured || isVerticalSlide( currentSlide ) ) {
                                                    event.preventDefault();
                                                }
                            Severity: Major
                            Found in meetups/meetup06-MobileDev/x-platform/js/reveal.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                        if (handler.comment) handler.comment(html.substring(4, index));

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

                                    create: function(navViewCtrl, viewLocals, enteringView, leavingView, renderStart, renderEnd) {
                                Severity: Minor
                                Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                          if( distanceX + distanceY < viewDistance ) {
                                                              showSlide( verticalSlide );
                                                          }
                                                          else {
                                                              hideSlide( verticalSlide );
                                  Severity: Major
                                  Found in meetups/meetup06-MobileDev/x-platform/js/reveal.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                            if ( typeof aPreviousChildElement.setAttribute == 'function' && aPreviousChildElement.tagName != "BR" ) {
                                                                previousParentElement = aPreviousChildElement;
                                                                break;
                                                            }
                                    Severity: Major
                                    Found in meetups/meetup06-MobileDev/x-platform/plugin/markdown/markdown.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                              while( pastFragments.length ) {
                                                                  var pastFragment = pastFragments.pop();
                                                                  pastFragment.classList.add( 'visible' );
                                                                  pastFragment.classList.remove( 'current-fragment' );
                                                              }
                                      Severity: Major
                                      Found in meetups/meetup06-MobileDev/x-platform/js/reveal.js - About 45 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language