fiuba/alfred

View on GitHub

Showing 654 of 654 total issues

Consider simplifying this complex logical expression.
Open

        if (inst == $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input &&
                // #6694 - don't focus the input if it's already focused
                // this breaks the change event in IE
                inst.input.is(':visible') && !inst.input.is(':disabled') && inst.input[0] != document.activeElement)
            inst.input.focus();
Severity: Major
Found in public/javascripts/jquery-ui/jquery-ui.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

                if ( matcher[ expando ] ) {
                    // Find the next relative operator (if any) for proper handling
                    j = ++i;
                    for ( ; j < len; j++ ) {
                        if ( Expr.relative[ tokens[j].type ] ) {
    Severity: Major
    Found in public/javascripts/jquery-1.9.0.js - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

          if ( o.mode === "toggle" && mode === "show" ) {
              el.from = o.to || zero;
              el.to = o.from || original;
          } else {
              el.from = o.from || ( mode === "show" ? zero : original );
      Severity: Major
      Found in public/javascripts/jquery-ui/jquery-ui.js - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

                if ( tab.hasClass( "ui-state-disabled" ) ||
                        // tab is already loading
                        tab.hasClass( "ui-tabs-loading" ) ||
                        // can't switch durning an animation
                        this.running ||
        Severity: Major
        Found in public/javascripts/jquery-ui/jquery-ui.js - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

                      if ( instances.length !== 0 && instances[ instances.length - 1 ] === $el &&
                          dialog.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
                          event.keyCode === $.ui.keyCode.ESCAPE ) {
          
                          dialog.close( event );
          Severity: Major
          Found in public/javascripts/jquery-ui/jquery-ui.js - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

            if ( $.uiBackCompat !== false ) {
            
                // helper method for a lot of the back compat extensions
                $.ui.tabs.prototype._ui = function( tab, panel ) {
                    return {
            Severity: Major
            Found in public/javascripts/jquery-ui/jquery-ui.js - About 40 mins to fix

              Consider simplifying this complex logical expression.
              Open

                          if ( ( this.options.values.length === 2 && this.options.range === true ) &&
                                  ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )
                              ) {
                              newVal = otherVal;
                          }
              Severity: Major
              Found in public/javascripts/jquery-ui/jquery-ui.js - About 40 mins to fix

                Consider simplifying this complex logical expression.
                Open

                        if (!target || !target.parentNode || !target.parentNode.parentNode || (target.parentNode.parentNode.tagName != "TBODY" && target.parentNode.parentNode.tagName != "THEAD") || target.isEditing) return;
                Severity: Major
                Found in public/javascripts/editablegrid-2.0.1.js - About 40 mins to fix

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

                          if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
                              $( active ).focus();
                          }
                  Severity: Minor
                  Found in public/javascripts/jquery-ui/jquery-ui.js and 1 other location - About 40 mins to fix
                  public/javascripts/jquery-ui/jquery-ui.js on lines 5256..5258

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

                  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

                              if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
                                  $( active ).focus();
                              }
                  Severity: Minor
                  Found in public/javascripts/jquery-ui/jquery-ui.js and 1 other location - About 40 mins to fix
                  public/javascripts/jquery-ui/jquery-ui.js on lines 5215..5217

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

                  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

                    _$('filter').onkeyup = function() { editableGrid.filter(_$('filter').value); countRows('#correctionsGrid'); };
                  Severity: Minor
                  Found in public/javascripts/assignments_students.js and 1 other location - About 40 mins to fix
                  public/javascripts/students_index.js on lines 22..25

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

                  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

                          $(this).addClass('list-row-action-wrapper-link-active')
                            .siblings('.list-row-action-popover-delete-one').first().show()
                            .find('.cancel').on('click', function() {
                  
                              $(this).parents('.list-row-action-popover-delete-one').hide()
                  Severity: Minor
                  Found in public/admin/javascripts/application.js and 1 other location - About 40 mins to fix
                  public/admin/javascripts/application.js on lines 89..98

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

                  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

                          from: {
                              y: el.from.height / original.height,
                              x: el.from.width / original.width
                          },
                  Severity: Minor
                  Found in public/javascripts/jquery-ui/jquery-ui.js and 1 other location - About 40 mins to fix
                  public/javascripts/jquery-ui/jquery-ui.js on lines 10583..10586

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

                  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

                          to: {
                              y: el.to.height / original.height,
                              x: el.to.width / original.width
                          }
                  Severity: Minor
                  Found in public/javascripts/jquery-ui/jquery-ui.js and 1 other location - About 40 mins to fix
                  public/javascripts/jquery-ui/jquery-ui.js on lines 10579..10582

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

                  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

                          $(this).addClass('active')
                            .siblings('.list-menu-popover-delete-selected').first().show()
                            .find('.cancel').on('click', function() {
                            
                              // Hide the popover on cancel
                  Severity: Minor
                  Found in public/admin/javascripts/application.js and 1 other location - About 40 mins to fix
                  public/admin/javascripts/application.js on lines 38..44

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

                  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

                    _$('filter').onkeyup = function() {
                         editableGrid.filter(_$('filter').value);
                         countRows('#studentsGrid');
                       };
                  Severity: Minor
                  Found in public/javascripts/students_index.js and 1 other location - About 40 mins to fix
                  public/javascripts/assignments_students.js on lines 26..26

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

                  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 _dialogDatepicker has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      _dialogDatepicker: function(input, date, onSelect, settings, pos) {
                  Severity: Minor
                  Found in public/javascripts/jquery-ui/jquery-ui.js - About 35 mins to fix

                    Function Tween has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    function Tween( elem, options, prop, end, easing ) {
                    Severity: Minor
                    Found in public/javascripts/jquery-1.9.0.js - About 35 mins to fix

                      Function toggleClass has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          toggleClass: function( classNames, force, speed, easing, callback ) {
                      Severity: Minor
                      Found in public/javascripts/jquery-ui/jquery-ui.js - About 35 mins to fix

                        Function remove has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            remove: function( elem, types, handler, selector, mappedTypes ) {
                        Severity: Minor
                        Found in public/javascripts/jquery-1.9.0.js - About 35 mins to fix
                          Severity
                          Category
                          Status
                          Source
                          Language