devstaff-crete/DevStaff-Heraklion

View on GitHub

Showing 1,642 of 1,642 total issues

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

            touch.startSpan = distanceBetween( {
                x: event.touches[1].clientX,
                y: event.touches[1].clientY
            }, {
                x: touch.startX,
Severity: Major
Found in meetups/meetup06-MobileDev/x-platform/js/reveal.js and 1 other location - About 1 hr to fix
meetups/meetup06-MobileDev/x-platform/js/reveal.js on lines 3679..3685

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

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

  self.snapToRest = function(e) {
    // We want to animate at the end of this
    self.content.enableAnimation();
    isDragging = false;

Severity: Minor
Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 1 hr to fix

    Function executeAnimationFn has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          function executeAnimationFn(fn, element, event, options, onDone) {
            var args;
            switch (event) {
              case 'animate':
                args = [element, options.from, options.to, onDone];

      Function groupEventedAnimations has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            function groupEventedAnimations(element, event, options, animations, fnName) {
              var operations = [];
              forEach(animations, function(ani) {
                var animation = ani[fnName];
                if (!animation) return;

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

          register: function(ele) {
            tapDoc = ele;
        
            tapEventListener('click', true, true);
            tapEventListener('mouseup');
        Severity: Minor
        Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic.js - About 1 hr to fix

          Function __resizeScrollbars has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            __resizeScrollbars: function() {
              var self = this;
          
              // Update horiz bar
              if (self.__indicatorX) {
          Severity: Minor
          Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic.js - About 1 hr to fix

            Function setup has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function setup() {
            
                  // do not setup if the container has no width
                  if (!container.offsetWidth) {
                    return;
            Severity: Minor
            Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic.js - About 1 hr to fix

              Function positionItem has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function positionItem(ele, itemType) {
                    if (!ele) return;
              
                    if (itemType === 'title') {
                      // title element
              Severity: Minor
              Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 1 hr to fix

                Function fn has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        fn: function(i) {
                          return {
                            cx: 32,
                            cy: 32,
                            a: [{
                Severity: Minor
                Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 1 hr to fix

                  Function addAttributes has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function addAttributes( section, element, previousElement, separatorElementAttributes, separatorSectionAttributes ) {
                  
                          if ( element != null && element.childNodes != undefined && element.childNodes.length > 0 ) {
                              previousParentElement = element;
                              for( var i = 0; i < element.childNodes.length; i++ ) {
                  Severity: Minor
                  Found in meetups/meetup06-MobileDev/x-platform/plugin/markdown/markdown.js - About 1 hr to fix

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

                      self.scrollBy = function(left, top, shouldAnimate) {
                        self.resize().then(function() {
                          scrollView.scrollBy(left, top, !!shouldAnimate);
                        });
                      };
                    meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js on lines 7077..7081

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

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

                          function prelink($scope, $element, $attr, tabsCtrl) {
                            var deregisterInstance = $ionicTabsDelegate._registerInstance(
                              tabsCtrl, $attr.delegateHandle, tabsCtrl.hasActiveScope
                            );
                    
                    
                    Severity: Minor
                    Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 1 hr to fix

                      Function zoomTo has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        zoomTo: function(level, animate, originLeft, originTop) {
                          var self = this;
                      
                          if (!self.options.zooming) {
                            throw new Error("Zooming is not enabled!");
                      Severity: Minor
                      Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic.js - About 1 hr to fix

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

                                    toArray( slide.querySelectorAll( 'iframe[src*="player.vimeo.com/"]' ) ).forEach( function( el ) {
                                        if( el.hasAttribute( 'data-autoplay' ) ) {
                                            el.contentWindow.postMessage( '{"method":"play"}', '*' );
                                        }
                                    });
                        Severity: Major
                        Found in meetups/meetup06-MobileDev/x-platform/js/reveal.js and 1 other location - About 1 hr to fix
                        meetups/meetup06-MobileDev/x-platform/js/reveal.js on lines 2738..2742

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

                        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

                          self.scrollTo = function(left, top, shouldAnimate) {
                            self.resize().then(function() {
                              scrollView.scrollTo(left, top, !!shouldAnimate);
                            });
                          };
                        meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js on lines 7095..7099

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

                        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

                                    toArray( slide.querySelectorAll( 'iframe[src*="youtube.com/embed/"]' ) ).forEach( function( el ) {
                                        if( el.hasAttribute( 'data-autoplay' ) ) {
                                            el.contentWindow.postMessage( '{"event":"command","func":"playVideo","args":""}', '*' );
                                        }
                                    });
                        Severity: Major
                        Found in meetups/meetup06-MobileDev/x-platform/js/reveal.js and 1 other location - About 1 hr to fix
                        meetups/meetup06-MobileDev/x-platform/js/reveal.js on lines 2745..2749

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

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

                            function removeEventListeners() {
                        
                                eventsAreBound = false;
                        
                                document.removeEventListener( 'keydown', onDocumentKeyDown, false );
                        Severity: Minor
                        Found in meetups/meetup06-MobileDev/x-platform/js/reveal.js - About 1 hr to fix

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

                                  start: function() {
                                    var runner;
                          
                                    var currentAnimation = startingAnimator.start();
                                    currentAnimation.done(function() {

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

                              function showLoader(options) {
                                options = extend({}, $ionicLoadingConfig || {}, options || {});
                                var delay = options.delay || options.showDelay || 0;
                            
                                deregisterStateListener1();
                            Severity: Minor
                            Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 1 hr to fix

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

                                self.showBack = function(shouldShow, disableReset) {
                                  // different from enableBack() because this will always have the back
                                  // visually hidden if false, even if the history says it should show
                                  if (arguments.length) {
                                    isBackShown = shouldShow;
                              meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js on lines 5045..5053

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

                              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