civio/quienmanda.es

View on GitHub

Showing 375 of 375 total issues

Function defaultPrefilter has 99 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function defaultPrefilter( elem, props, opts ) {
    /* jshint validthis: true */
    var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
        anim = this,
        orig = {},
Severity: Major
Found in extras/trips/src/js/jquery-2.2.4.js - About 3 hrs to fix

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

          if (e.C.shapes[0].geometry.x > 0.5) {
            $annoPopup.css('left', $annoPopup.position().left - $annoPopup.width() - 16 + (e.C.shapes[0].geometry.width*$('.annotorious-annotationlayer').width()) );
          }
    Severity: Major
    Found in app/assets/javascripts/custom.js and 1 other location - About 3 hrs to fix
    app/assets/javascripts/widget/widget.js on lines 62..64

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

    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( e.K.shapes[0].geometry.x > 0.5 ){
          $annoPopup.css('left', $annoPopup.position().left - $annoPopup.width() - 16 + (e.K.shapes[0].geometry.width*$('.annotorious-annotationlayer').width()) );
        }
    Severity: Major
    Found in app/assets/javascripts/widget/widget.js and 1 other location - About 3 hrs to fix
    app/assets/javascripts/custom.js on lines 193..195

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

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

    function Animation( elem, properties, options ) {
        var result,
            stopped,
            index = 0,
            length = Animation.prefilters.length,
    Severity: Major
    Found in extras/trips/dist/js/qm-trips.js - About 3 hrs to fix

      Function Animation has 92 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function Animation( elem, properties, options ) {
          var result,
              stopped,
              index = 0,
              length = Animation.prefilters.length,
      Severity: Major
      Found in extras/trips/src/js/jquery-2.2.4.js - About 3 hrs to fix

        Function trigger has 87 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            trigger: function( event, data, elem, onlyHandlers ) {
        
                var i, cur, tmp, bubbleType, ontype, handle, special,
                    eventPath = [ elem || document ],
                    type = hasOwn.call( event, "type" ) ? event.type : event,
        Severity: Major
        Found in extras/trips/dist/js/qm-trips.js - About 3 hrs to fix

          Function trigger has 87 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              trigger: function( event, data, elem, onlyHandlers ) {
          
                  var i, cur, tmp, bubbleType, ontype, handle, special,
                      eventPath = [ elem || document ],
                      type = hasOwn.call( event, "type" ) ? event.type : event,
          Severity: Major
          Found in extras/trips/src/js/jquery-2.2.4.js - About 3 hrs to fix

            Function rectDefinition has 85 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function rectDefinition() {
            
            // -------------------------- Rect -------------------------- //
            
            function Rect( props ) {
            Severity: Major
            Found in app/assets/javascripts/packery.pkgd.js - About 3 hrs to fix

              Function itemDefinition has 84 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function itemDefinition( getStyleProperty, Outlayer, Rect ) {
              
              var transformProperty = getStyleProperty('transform');
              
              // sub-class Item
              Severity: Major
              Found in app/assets/javascripts/packery.pkgd.js - About 3 hrs to fix

                Function packerDefinition has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function packerDefinition( Rect ) {
                
                /**
                 * @param {Number} width
                 * @param {Number} height
                Severity: Major
                Found in app/assets/javascripts/packery.pkgd.js - About 3 hrs to fix

                  Function Sizzle has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function Sizzle( selector, context, results, seed ) {
                      var m, i, elem, nid, nidselect, match, groups, newSelector,
                          newContext = context && context.ownerDocument,
                  
                          // nodeType defaults to 9, since context defaults to document
                  Severity: Major
                  Found in extras/trips/src/js/jquery-2.2.4.js - About 3 hrs to fix

                    Function Sizzle has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function Sizzle( selector, context, results, seed ) {
                        var m, i, elem, nid, nidselect, match, groups, newSelector,
                            newContext = context && context.ownerDocument,
                    
                            // nodeType defaults to 9, since context defaults to document
                    Severity: Major
                    Found in extras/trips/dist/js/qm-trips.js - About 3 hrs to fix

                      Function CHILD has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              "CHILD": function( type, what, argument, first, last ) {
                                  var simple = type.slice( 0, 3 ) !== "nth",
                                      forward = type.slice( -4 ) !== "last",
                                      ofType = what === "of-type";
                      
                      
                      Severity: Major
                      Found in extras/trips/src/js/jquery-2.2.4.js - About 3 hrs to fix

                        Function CHILD has 80 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                "CHILD": function( type, what, argument, first, last ) {
                                    var simple = type.slice( 0, 3 ) !== "nth",
                                        forward = type.slice( -4 ) !== "last",
                                        ofType = what === "of-type";
                        
                        
                        Severity: Major
                        Found in extras/trips/dist/js/qm-trips.js - About 3 hrs to fix

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

                                (this.start.hasNoStart ? '?' : this.start.getFullYear() + (this.start.hasMonth ? '-' + this.formatMonth(this.start.getMonth() + 1) : '' ) + '-' + this.formatMonth(this.start.getDate())),
                          Severity: Major
                          Found in app/assets/javascripts/timesheet.js and 1 other location - About 3 hrs to fix
                          app/assets/javascripts/timesheet.js on lines 197..197

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

                          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.end ? ' | ' + ( (this.end.isNow) ? 'actualidad' : (this.end.getFullYear() + (this.end.hasMonth ? '-' + this.formatMonth(this.end.getMonth() + 1) : '' ) + '-' + this.formatMonth(this.start.getDate()))) : '')
                          Severity: Major
                          Found in app/assets/javascripts/timesheet.js and 1 other location - About 3 hrs to fix
                          app/assets/javascripts/timesheet.js on lines 196..196

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

                          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

                          Method show has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
                          Open

                            def show
                              authorize! :read, @post
                              if stale?(@post)
                                @title = @post.title
                          
                          
                          Severity: Minor
                          Found in app/controllers/posts_controller.rb - About 3 hrs to fix

                          Cognitive Complexity

                          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                          A method's cognitive complexity is based on a few simple rules:

                          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                          • Code is considered more complex for each "break in the linear flow of the code"
                          • Code is considered more complex when "flow breaking structures are nested"

                          Further reading

                          Function send has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      send: function( headers, complete ) {
                                          var i,
                                              xhr = options.xhr();
                          
                                          xhr.open(
                          Severity: Major
                          Found in extras/trips/dist/js/qm-trips.js - About 3 hrs to fix

                            Function send has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                        send: function( headers, complete ) {
                                            var i,
                                                xhr = options.xhr();
                            
                                            xhr.open(
                            Severity: Major
                            Found in extras/trips/src/js/jquery-2.2.4.js - About 3 hrs to fix

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

                              Outlayer.prototype.hide = function( items ) {
                                var len = items && items.length;
                                if ( !len ) {
                                  return;
                                }
                              Severity: Major
                              Found in app/assets/javascripts/packery.pkgd.js and 1 other location - About 2 hrs to fix
                              app/assets/javascripts/packery.pkgd.js on lines 2583..2592

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

                              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