devstaff-crete/DevStaff-Heraklion

View on GitHub

Showing 1,635 of 1,635 total issues

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

          $scope.$watch(function() {
            return listCtrl.showReorder();
          }, 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 10817..10831

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

Function RevealSearch has 137 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var RevealSearch = (function() {

    var matchedSlides;
    var currentMatchedIndex;
    var searchboxDirty;
Severity: Major
Found in meetups/meetup06-MobileDev/x-platform/plugin/search/search.js - About 5 hrs to fix

    Function compile has 135 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        compile: function(element, attr) {
          element.addClass('menu-content pane');
    
          return { pre: prelink };
          function prelink($scope, $element, $attr, sideMenuCtrl) {
    Severity: Major
    Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 5 hrs to fix

      Function resourceFactory has 133 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            function resourceFactory(url, paramDefaults, actions, options) {
              var route = new Route(url, options);
      
              actions = extend({}, provider.defaults.actions, actions);
      
      

        Function prelink has 131 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              function prelink($scope, $element, $attr, sideMenuCtrl) {
                var startCoord = null;
                var primaryScrollAxis = null;
        
                if (isDefined(attr.dragContent)) {
        Severity: Major
        Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 5 hrs to fix

          Function exports has 127 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          module.exports = function(grunt) {
              var port = grunt.option('port') || 8001;
              // Project configuration
              grunt.initConfig({
                  pkg: grunt.file.readJSON('package.json'),
          Severity: Major
          Found in meetups/meetup06-MobileDev/x-platform/Gruntfile.js - About 5 hrs to fix

            Function $Resolve has 124 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function $Resolve(  $q,    $injector) {
              
              var VISIT_IN_PROGRESS = 1,
                  VISIT_DONE = 2,
                  NOTHING = {},

              Function DynamicViewType has 122 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function DynamicViewType() {
                    var self = this;
                    var debouncedScrollViewSetDimensions = ionic.debounce(scrollViewSetDimensions, 25, true);
                    var calculateDimensions = isGridView ? calculateDimensionsGrid : calculateDimensionsList;
                    var dimensionsIndex;
              Severity: Major
              Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 4 hrs to fix

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

                      function start() {
                        if (animationClosed) return;
                        if (!node.parentNode) {
                          close();
                          return;

                  Function createHeaderBar has 119 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    self.createHeaderBar = function(isActive) {
                      var containerEle = jqLite('<div class="nav-bar-block">');
                      ionic.DomUtil.cachedAttr(containerEle, 'nav-bar', isActive ? 'active' : 'cached');
                  
                      var alignTitle = $attrs.alignTitle || $ionicConfig.navBar.alignTitle();
                  Severity: Major
                  Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 4 hrs to fix

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

                          forEach({
                            'name': attr.name,
                            'ng-value': attr.ngValue,
                            'ng-model': attr.ngModel,
                            'ng-checked': attr.ngChecked,
                    meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js on lines 13269..13284

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

                    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

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

                          forEach({
                            'name': attr.name,
                            'ng-value': attr.ngValue,
                            'ng-model': attr.ngModel,
                            'ng-checked': attr.ngChecked,
                    meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js on lines 8381..8396

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

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

                    var $$AnimateRunnerFactory = ['$q', '$$rAFMutex', function($q, $$rAFMutex) {
                      var INITIAL_STATE = 0;
                      var DONE_PENDING_STATE = 1;
                      var DONE_COMPLETE_STATE = 2;
                    
                    

                      Function doTouchMove has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        doTouchMove: function(touches, timeStamp, scale) {
                          if (timeStamp instanceof Date) {
                            timeStamp = timeStamp.valueOf();
                          }
                          if (typeof timeStamp !== "number") {
                      Severity: Major
                      Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic.js - About 4 hrs to fix

                        Function study has 113 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          this.study = function (invocables) {
                            if (!isObject(invocables)) throw new Error("'invocables' must be an object");
                            var invocableKeys = objectKeys(invocables || {});
                            
                            // Perform a topological sort of invocables to build an ordered plan

                          Function htmlParser has 107 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function htmlParser(html, handler) {
                            if (typeof html !== 'string') {
                              if (html === null || typeof html === 'undefined') {
                                html = '';
                              } else {

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

                                } else if (window.navigator.msPointerEnabled) {
                                  // IE10, WP8 (Pointer Events)
                                  container.addEventListener("MSPointerDown", self.touchStart, false);
                                  if(self.options.preventDefault) container.addEventListener("MSPointerMove", self.touchMoveBubble, false);
                                  document.addEventListener("MSPointerMove", self.touchMove, false);
                            Severity: Major
                            Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic.js and 1 other location - About 4 hrs to fix
                            meetups/meetup06-MobileDev/x-platform/ionic/js/ionic.js on lines 5271..5337

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

                            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

                                } else if (window.navigator.pointerEnabled) {
                                  // Pointer Events
                                  container.addEventListener("pointerdown", self.touchStart, false);
                                  if(self.options.preventDefault) container.addEventListener("pointermove", self.touchMoveBubble, false);
                                  document.addEventListener("pointermove", self.touchMove, false);
                            Severity: Major
                            Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic.js and 1 other location - About 4 hrs to fix
                            meetups/meetup06-MobileDev/x-platform/ionic/js/ionic.js on lines 5280..5337

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

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

                                compile: function(element, attr) {
                            
                                  //We create the tabNavTemplate in the compile phase so that the
                                  //attributes we pass down won't be interpolated yet - we want
                                  //to pass down the 'raw' versions of the attributes
                            Severity: Major
                            Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 4 hrs to fix

                              Function $ViewDirective has 104 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function $ViewDirective(   $state,   $injector,   $uiViewScroll,   $interpolate) {
                              
                                function getService() {
                                  return ($injector.has) ? function(service) {
                                    return $injector.has(service) ? $injector.get(service) : null;
                                Severity
                                Category
                                Status
                                Source
                                Language