devstaff-crete/DevStaff-Heraklion

View on GitHub

Showing 1,635 of 1,635 total issues

Function CollectionRepeatDirective has 230 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function CollectionRepeatDirective($ionicCollectionManager, $parse, $window, $$rAF, $rootScope, $timeout) {
  return {
    restrict: 'A',
    priority: 1000,
    transclude: 'element',
Severity: Major
Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 1 day to fix

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

            [ 'touchstart', 'click' ].forEach( function( eventName ) {
                dom.controlsLeft.forEach( function( el ) { el.removeEventListener( eventName, onNavigateLeftClicked, false ); } );
                dom.controlsRight.forEach( function( el ) { el.removeEventListener( eventName, onNavigateRightClicked, false ); } );
                dom.controlsUp.forEach( function( el ) { el.removeEventListener( eventName, onNavigateUpClicked, false ); } );
                dom.controlsDown.forEach( function( el ) { el.removeEventListener( eventName, onNavigateDownClicked, false ); } );
    Severity: Major
    Found in meetups/meetup06-MobileDev/x-platform/js/reveal.js and 1 other location - About 1 day to fix
    meetups/meetup06-MobileDev/x-platform/js/reveal.js on lines 938..945

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

    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

            pointerEvents.forEach( function( eventName ) {
                dom.controlsLeft.forEach( function( el ) { el.addEventListener( eventName, onNavigateLeftClicked, false ); } );
                dom.controlsRight.forEach( function( el ) { el.addEventListener( eventName, onNavigateRightClicked, false ); } );
                dom.controlsUp.forEach( function( el ) { el.addEventListener( eventName, onNavigateUpClicked, false ); } );
                dom.controlsDown.forEach( function( el ) { el.addEventListener( eventName, onNavigateDownClicked, false ); } );
    Severity: Major
    Found in meetups/meetup06-MobileDev/x-platform/js/reveal.js and 1 other location - About 1 day to fix
    meetups/meetup06-MobileDev/x-platform/js/reveal.js on lines 982..989

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

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

      function postLink(scope, element, attr, scrollCtrl, transclude) {
        var scrollView = scrollCtrl.scrollView;
        var node = element[0];
        var containerNode = angular.element('<div class="collection-repeat-container">')[0];
        node.parentNode.replaceChild(containerNode, node);
    Severity: Major
    Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 1 day to fix

      Function create has 212 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          create: function(navViewCtrl, viewLocals, enteringView, leavingView, renderStart, renderEnd) {
            // get a reference to an entering/leaving element if they exist
            // loop through to see if the view is already in the navViewElement
            var enteringEle, leavingEle;
            var transitionId = ++transitionCounter;
      Severity: Major
      Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 1 day to fix

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

          function $get(   $rootScope,   $q,   $view,   $injector,   $resolve,   $stateParams,   $urlRouter,   $location,   $urlMatcherFactory) {
        
            var TransitionSuperseded = $q.reject(new Error('transition superseded'));
            var TransitionPrevented = $q.reject(new Error('transition prevented'));
            var TransitionAborted = $q.reject(new Error('transition aborted'));

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

              this.$get = ['$http', '$q', function($http, $q) {
          
                var noop = angular.noop,
                  forEach = angular.forEach,
                  extend = angular.extend,

            Function $$AnimateJsProvider has 203 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            var $$AnimateJsProvider = ['$animateProvider', function($animateProvider) {
              this.$get = ['$injector', '$$AnimateRunner', '$$rAFMutex', '$$jqLite',
                   function($injector,   $$AnimateRunner,   $$rAFMutex,   $$jqLite) {
            
                var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);

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

                     function($injector,   $$AnimateRunner,   $$rAFMutex,   $$jqLite) {
              
                  var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
                       // $animateJs(element, 'enter');
                  return function(element, event, classes, options) {

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

                    function VerticalViewType() {
                      this.getItemPrimarySize = heightGetter;
                      this.getItemSecondarySize = widthGetter;
                
                      this.getScrollValue = function() {
                meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js on lines 9158..9177

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

                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

                    function HorizontalViewType() {
                      this.getItemPrimarySize = widthGetter;
                      this.getItemSecondarySize = heightGetter;
                
                      this.getScrollValue = function() {
                meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js on lines 9138..9157

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

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

                  __initEventHandlers: function() {
                    var self = this;
                
                    // Event Handler
                    var container = self.__container;
                Severity: Major
                Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic.js - About 7 hrs to fix

                  Function register has 188 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      register: function(parentScope, viewLocals) {
                  
                        var currentStateId = getCurrentStateId(),
                            hist = getHistory(parentScope),
                            currentView = viewHistory.currentView,
                  Severity: Major
                  Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 7 hrs to fix

                    Function zoom has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
                    Open

                    var zoom = (function(){
                    
                        // The current zoom level (scale)
                        var level = 1;
                    
                    
                    Severity: Minor
                    Found in meetups/meetup06-MobileDev/x-platform/plugin/zoom-js/zoom.js - About 7 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 $$AnimateCssDriverProvider has 180 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var $$AnimateCssDriverProvider = ['$$animationProvider', function($$animationProvider) {
                      $$animationProvider.drivers.push('$$animateCssDriver');
                    
                      var NG_ANIMATE_SHIM_CLASS_NAME = 'ng-animate-shim';
                      var NG_ANIMATE_ANCHOR_CLASS_NAME = 'ng-anchor';

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

                             function($animateCss,   $rootScope,   $$AnimateRunner,   $rootElement,   $document,   $sniffer) {
                      
                          // only browsers that support these properties can render animations
                          if (!$sniffer.animations && !$sniffer.transitions) return noop;
                      
                      

                        Function queueAnimation has 155 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function queueAnimation(element, event, options) {
                              var node, parent;
                              element = stripCommentsFromElement(element);
                              if (element) {
                                node = getDomNode(element);

                          Function zoom has 152 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          var zoom = (function(){
                          
                              // The current zoom level (scale)
                              var level = 1;
                          
                          
                          Severity: Major
                          Found in meetups/meetup06-MobileDev/x-platform/plugin/zoom-js/zoom.js - About 6 hrs to fix

                            Function $UrlRouterProvider has 143 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function $UrlRouterProvider(   $locationProvider,   $urlMatcherFactory) {
                              var rules = [], otherwise = null, interceptDeferred = false, listener;
                            
                              // Returns a string that is a prefix of all strings matching the RegExp
                              function regExpPrefix(re) {

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

                                        $scope.$watch(function() {
                                          return listCtrl.showDelete();
                                        }, function(isShown, wasShown) {
                                          //Only use isShown=false if it was already shown
                                          if (!isShown && !wasShown) { return; }
                              meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js on lines 10833..10847

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

                              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