nukomeet/coworfing

View on GitHub

Showing 60 of 60 total issues

Function _optionDatepicker has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

$.datepicker._optionDatepicker = function(target, name, value) {
    var inst = this._getInst(target),
        tp_inst = this._get(inst, 'timepicker');
    if (tp_inst) {
        var min = null, max = null, onselect = null;
Severity: Minor
Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 1 hr to fix

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

            if(min) { //if min was set
                if (min == 0)
                    min = new Date();
                else
                    min = new Date(min);
    Severity: Major
    Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js and 1 other location - About 1 hr to fix
    lib/assets/javascripts/jquery-ui-timepicker-addon.js on lines 1297..1305

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

    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 3 locations. Consider refactoring.
    Open

            if(tp_inst._defaults.maxDateTime !== undefined && tp_inst._defaults.maxDateTime instanceof Date)
                tp_inst._defaults.maxDate = new Date(tp_inst._defaults.maxDateTime.getTime());
    Severity: Major
    Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js and 2 other locations - About 1 hr to fix
    lib/assets/javascripts/jquery-ui-timepicker-addon.js on lines 210..211
    lib/assets/javascripts/jquery-ui-timepicker-addon.js on lines 212..213

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

    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 3 locations. Consider refactoring.
    Open

            if(tp_inst._defaults.minDateTime !== undefined && tp_inst._defaults.minDateTime instanceof Date)
                tp_inst._defaults.minDate = new Date(tp_inst._defaults.minDateTime.getTime());
    Severity: Major
    Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js and 2 other locations - About 1 hr to fix
    lib/assets/javascripts/jquery-ui-timepicker-addon.js on lines 212..213
    lib/assets/javascripts/jquery-ui-timepicker-addon.js on lines 214..215

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

    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 3 locations. Consider refactoring.
    Open

            if(tp_inst._defaults.maxDate !== undefined && tp_inst._defaults.maxDate instanceof Date)
                tp_inst._defaults.maxDateTime = new Date(tp_inst._defaults.maxDate.getTime());
    Severity: Major
    Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js and 2 other locations - About 1 hr to fix
    lib/assets/javascripts/jquery-ui-timepicker-addon.js on lines 210..211
    lib/assets/javascripts/jquery-ui-timepicker-addon.js on lines 214..215

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

    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 (max) { //if max was set
                if(max==0)
                    max=new Date();
                else
                    max= new Date(max);
    Severity: Major
    Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js and 1 other location - About 1 hr to fix
    lib/assets/javascripts/jquery-ui-timepicker-addon.js on lines 1289..1305

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

    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(this.hourMaxOriginal === null || this.minuteMaxOriginal === null || this.secondMaxOriginal === null){
                    this.hourMaxOriginal = o.hourMax;
                    this.minuteMaxOriginal = o.minuteMax;
                    this.secondMaxOriginal = o.secondMax;
                    this.millisecMaxOriginal = o.millisecMax;
    Severity: Major
    Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js and 1 other location - About 1 hr to fix
    lib/assets/javascripts/jquery-ui-timepicker-addon.js on lines 686..691

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

    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(this.hourMinOriginal === null || this.minuteMinOriginal === null || this.secondMinOriginal === null || this.millisecMinOriginal === null){
                    this.hourMinOriginal = o.hourMin;
                    this.minuteMinOriginal = o.minuteMin;
                    this.secondMinOriginal = o.secondMin;
                    this.millisecMinOriginal = o.millisecMin;
    Severity: Major
    Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js and 1 other location - About 1 hr to fix
    lib/assets/javascripts/jquery-ui-timepicker-addon.js on lines 726..731

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

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

    $.datepicker.formatTime = function(format, time, options) {
        options = options || {};
        options = $.extend($.timepicker._defaults, options);
        time = $.extend({hour:0, minute:0, second:0, millisec:0, timezone:'+0000'}, time);
    
    
    Severity: Minor
    Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 1 hr to fix

      Function _onTimeChange has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _onTimeChange: function() {
              var hour   = (this.hour_slider) ? this.hour_slider.slider('value') : false,
                  minute = (this.minute_slider) ? this.minute_slider.slider('value') : false,
                  second = (this.second_slider) ? this.second_slider.slider('value') : false,
                  millisec = (this.millisec_slider) ? this.millisec_slider.slider('value') : false,
      Severity: Minor
      Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

                if ((hour < defaults.hourMin || hour > defaults.hourMax) || (minute < defaults.minuteMin || minute > defaults.minuteMax) || (second < defaults.secondMin || second > defaults.secondMax) || (millisec < defaults.millisecMin || millisec > defaults.millisecMax)) {
                    hour = defaults.hourMin;
                    minute = defaults.minuteMin;
                    second = defaults.secondMin;
                    millisec = defaults.millisecMin;
        Severity: Critical
        Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 1 hr to fix

          Function _placeBrick has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _placeBrick: function( brick ) {
                var $brick = $(brick),
                    colSpan, groupCount, groupY, groupColY, j;
          
                //how many columns does this brick span
          Severity: Minor
          Found in lib/assets/javascripts/jquery.masonry.min.js - About 1 hr to fix

            Method all has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def all
                auth = request.env['omniauth.auth']
              
                # Find an identity here
                @identity = Identity.find_with_omniauth(auth)
            Severity: Minor
            Found in app/controllers/omniauth_callbacks_controller.rb - About 1 hr to fix

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

                  layout : function( $bricks, callback ) {
              
                    // place each brick
                    for (var i=0, len = $bricks.length; i < len; i++) {
                      this._placeBrick( $bricks[i] );
              Severity: Minor
              Found in lib/assets/javascripts/jquery.masonry.min.js - About 1 hr to fix

                Function _create has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _create : function( options ) {
                      
                      this.options = $.extend( true, {}, $.Mason.settings, options );
                      this.styleQueue = [];
                
                
                Severity: Minor
                Found in lib/assets/javascripts/jquery.masonry.min.js - About 1 hr to fix

                  Function _updateDateTime has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      _updateDateTime: function(dp_inst) {
                          dp_inst = this.inst || dp_inst;
                          var dt = $.datepicker._daylightSavingAdjust(new Date(dp_inst.selectedYear, dp_inst.selectedMonth, dp_inst.selectedDay)),
                              dateFmt = $.datepicker._get(dp_inst, 'dateFormat'),
                              formatCfg = $.datepicker._getFormatConfig(dp_inst),
                  Severity: Minor
                  Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js - About 1 hr to fix

                    Function imagesLoaded has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      $.fn.imagesLoaded = function( callback ) {
                        var $this = this,
                            $images = $this.find('img').add( $this.filter('img') ),
                            len = $images.length,
                            blank = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==',
                    Severity: Minor
                    Found in lib/assets/javascripts/jquery.masonry.min.js - About 1 hr to fix

                      Function masonry has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        $.fn.masonry = function( options ) {
                          if ( typeof options === 'string' ) {
                            // call method
                            var args = Array.prototype.slice.call( arguments, 1 );
                      
                      
                      Severity: Minor
                      Found in lib/assets/javascripts/jquery.masonry.min.js - About 1 hr to fix

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

                                    if(this.second_slider)
                                        this.second_slider.slider("option", { min: this._defaults.secondMin, max: secMax }).slider('value', this.second);
                        Severity: Major
                        Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js and 3 other locations - About 1 hr to fix
                        lib/assets/javascripts/jquery-ui-timepicker-addon.js on lines 767..768
                        lib/assets/javascripts/jquery-ui-timepicker-addon.js on lines 769..770
                        lib/assets/javascripts/jquery-ui-timepicker-addon.js on lines 773..774

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

                        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 4 locations. Consider refactoring.
                        Open

                                    if(this.millisec_slider)
                                        this.millisec_slider.slider("option", { min: this._defaults.millisecMin, max: millisecMax }).slider('value', this.millisec);
                        Severity: Major
                        Found in lib/assets/javascripts/jquery-ui-timepicker-addon.js and 3 other locations - About 1 hr to fix
                        lib/assets/javascripts/jquery-ui-timepicker-addon.js on lines 767..768
                        lib/assets/javascripts/jquery-ui-timepicker-addon.js on lines 769..770
                        lib/assets/javascripts/jquery-ui-timepicker-addon.js on lines 771..772

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

                        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