devstaff-crete/DevStaff-Heraklion

View on GitHub

Showing 1,642 of 1,642 total issues

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

    if (isDefined($attrs.hideNavBar)) {
      deregisters.push($scope.$watch($attrs.hideNavBar, function(val) {
        navViewCtrl.showBar(!val);
      }));
    }
meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js on lines 8246..8250

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

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

  self.enableBack = function(shouldEnable, disableReset) {
    // whether or not the back button show be visible, according
    // to the navigation and history
    if (arguments.length) {
      isBackEnabled = shouldEnable;
meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js on lines 5056..5064

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

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

    if (isDefined($attrs.hideBackButton)) {
      deregisters.push($scope.$watch($attrs.hideBackButton, function(val) {
        navViewCtrl.showBackButton(!val);
      }));
    }
meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js on lines 8252..8256

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

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

       function($$rAF,   $rootScope,   $rootElement,   $document,   $$HashMap,
                $$animation,   $$AnimateRunner,   $templateRequest,   $$jqLite) {

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

      function $get(   $rootScope,   $q,   $view,   $injector,   $resolve,   $stateParams,   $urlRouter,   $location,   $urlMatcherFactory) {

      Function showPreview has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function showPreview( url ) {
      
              closeOverlay();
      
              dom.overlay = document.createElement( 'div' );
      Severity: Minor
      Found in meetups/meetup06-MobileDev/x-platform/js/reveal.js - About 1 hr to fix

        Function to has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                to: function( options ) {
        
                    // Due to an implementation limitation we can't zoom in
                    // to another element without zooming out first
                    if( level !== 1 ) {
        Severity: Minor
        Found in meetups/meetup06-MobileDev/x-platform/plugin/zoom-js/zoom.js - About 1 hr to fix

          Function showHelp has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function showHelp() {
          
                  if( config.help ) {
          
                      closeOverlay();
          Severity: Minor
          Found in meetups/meetup06-MobileDev/x-platform/js/reveal.js - About 1 hr to fix

            Function getProgress has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function getProgress() {
            
                    var horizontalSlides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) );
            
                    // The number of past and total slides
            Severity: Minor
            Found in meetups/meetup06-MobileDev/x-platform/js/reveal.js - About 1 hr to fix

              Function updateControls has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function updateControls() {
              
                      var routes = availableRoutes();
                      var fragments = availableFragments();
              
              
              Severity: Minor
              Found in meetups/meetup06-MobileDev/x-platform/js/reveal.js - About 1 hr to fix

                Function step has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      var step = function(virtual) {
                
                        // Normalize virtual value
                        var render = virtual !== true;
                
                
                Severity: Minor
                Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic.js - About 1 hr to fix

                  Function $ViewDirectiveFill has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function $ViewDirectiveFill (  $compile,   $controller,   $state,   $interpolate) {
                    return {
                      restrict: 'ECA',
                      priority: -400,
                      compile: function (tElement) {

                    Function invoke has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          function invoke(key, invocable, params) {
                            // Create a deferred for this invocation. Failures will propagate to the resolution as well.
                            var invocation = $q.defer(), waitParams = 0;
                            function onfailure(reason) {
                              invocation.reject(reason);

                      Function registerState has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function registerState(state) {
                          // Wrap a new object around the state so we can store our private details easily.
                          state = inherit(state, {
                            self: state,
                            resolve: state.resolve || {},

                        Function keyboardWaitForResize has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function keyboardWaitForResize(callback, isOpening) {
                          clearInterval(waitForResizeTimer);
                          var count = 0;
                          var maxCount;
                          var initialHeight = getViewportHeight();
                        Severity: Minor
                        Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic.js - About 1 hr to fix

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

                                link: function($scope, $element, $attr) {
                                  if ($attr.noTapScroll == 'true') {
                                    return;
                                  }
                                  ionic.on('tap', onTap, $element[0]);
                          Severity: Minor
                          Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic-angular.js - About 1 hr to fix

                            Function exec has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            UrlMatcher.prototype.exec = function (path, searchParams) {
                              var m = this.regexp.exec(path);
                              if (!m) return null;
                              searchParams = searchParams || {};
                            
                            

                              Function findState has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                function findState(stateOrName, base) {
                                  if (!stateOrName) return undefined;
                              
                                  var isStr = isString(stateOrName),
                                      name  = isStr ? stateOrName : stateOrName.name,

                                Function animateScroll has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                      function animateScroll(Y, X) {
                                        // scroll animation loop w/ easing
                                        // credit https://gist.github.com/dezinezync/5487119
                                        var start = Date.now(),
                                          duration = 250, //milliseconds
                                Severity: Minor
                                Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic.js - About 1 hr to fix

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

                                    SlideDrag.prototype.start = function(e) {
                                      var content, buttons, offsetX, buttonsWidth;
                                  
                                      if (!this.canSwipe()) {
                                        return;
                                  Severity: Minor
                                  Found in meetups/meetup06-MobileDev/x-platform/ionic/js/ionic.js - About 1 hr to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language