DamageStudios/rims

View on GitHub

Showing 250 of 250 total issues

Function setDocument has 218 lines of code (exceeds 25 allowed). Consider refactoring.
Open

setDocument = Sizzle.setDocument = function( node ) {
    var hasCompare, parent,
        doc = node ? node.ownerDocument || node : preferredDoc;

    // Return early if doc is invalid or already selected

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

            var forEach = function(object, block, context) {
              if (object) {
                var resolve = Object; // default
                if (object instanceof Function) {
                  // functions have a "length" property
    app/assets/javascripts/application.js on lines 495..514

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

    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

            var forEach = function(object, block, context) {
              if (object) {
                var resolve = Object; // default
                if (object instanceof Function) {
                  // functions have a "length" property
    Severity: Major
    Found in app/assets/javascripts/application.js and 1 other location - About 5 hrs to fix
    public/assets/application-404f4a61b35c93d3441d4475969d79cc4182aff2126750b4beaab13f73340f19.js on lines 15137..15156

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

    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

            function handleEvent(event) {
              var returnValue = true;
              // grab the event object (IE uses a global event object)
              event = event || fixEvent(((this.ownerDocument || this.document || this).parentWindow || window).event);
              // get a reference to the hash table of event handlers
    app/assets/javascripts/application.js on lines 433..447

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

    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

            function handleEvent(event) {
              var returnValue = true;
              // grab the event object (IE uses a global event object)
              event = event || fixEvent(((this.ownerDocument || this.document || this).parentWindow || window).event);
              // get a reference to the hash table of event handlers
    Severity: Major
    Found in app/assets/javascripts/application.js and 1 other location - About 5 hrs to fix
    public/assets/application-404f4a61b35c93d3441d4475969d79cc4182aff2126750b4beaab13f73340f19.js on lines 15075..15089

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

    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

    Consider simplifying this complex logical expression.
    Open

                if ( event.pageX == null && original.clientX != null ) {
                    eventDoc = event.target.ownerDocument || document;
                    doc = eventDoc.documentElement;
                    body = eventDoc.body;
    
    

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

        function Plugin(option) {
          return this.each(function () {
            var $this   = $(this)
            var data    = $this.data('bs.popover')
            var options = typeof option == 'object' && option
      public/assets/application-404f4a61b35c93d3441d4475969d79cc4182aff2126750b4beaab13f73340f19.js on lines 12882..12892

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

      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

        function Plugin(option) {
          return this.each(function () {
            var $this   = $(this)
            var data    = $this.data('bs.tooltip')
            var options = typeof option == 'object' && option
      public/assets/application-404f4a61b35c93d3441d4475969d79cc4182aff2126750b4beaab13f73340f19.js on lines 12996..13006

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

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

      jQuery.Callbacks = function( options ) {
      
          // Convert options from String-formatted to Object-formatted if needed
          // (we check in cache first)
          options = typeof options === "string" ?

        Function defaultPrefilter has 105 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 = {},

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

            function Plugin(option) {
              return this.each(function () {
                var $this   = $(this)
                var data    = $this.data('bs.affix')
                var options = typeof option == 'object' && option
          public/assets/application-404f4a61b35c93d3441d4475969d79cc4182aff2126750b4beaab13f73340f19.js on lines 12285..12294

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

          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

            function Plugin(option) {
              return this.each(function () {
                var $this   = $(this)
                var data    = $this.data('bs.scrollspy')
                var options = typeof option == 'object' && option
          public/assets/application-404f4a61b35c93d3441d4475969d79cc4182aff2126750b4beaab13f73340f19.js on lines 13628..13637

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

          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

          File application.js has 338 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          // This is a manifest file that'll be compiled into application.js, which will include all the files
          // listed below.
          //
          // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
          // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
          Severity: Minor
          Found in app/assets/javascripts/application.js - About 4 hrs to fix

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

                trigger: function( event, data, elem, onlyHandlers ) {
                    var handle, ontype, cur,
                        bubbleType, special, tmp, i,
                        eventPath = [ elem || document ],
                        type = hasOwn.call( event, "type" ) ? event.type : event,

              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,

                Function makeSortable has 89 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  makeSortable: function(table) {
                    if (table.getElementsByTagName('thead').length == 0) {
                      // table doesn't have a tHead. Since it should have, create one and
                      // put the first table row in it.
                      the = document.createElement('thead');

                  Function makeSortable has 89 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    makeSortable: function(table) {
                      if (table.getElementsByTagName('thead').length == 0) {
                        // table doesn't have a tHead. Since it should have, create one and
                        // put the first table row in it.
                        the = document.createElement('thead');
                  Severity: Major
                  Found in app/assets/javascripts/application.js - About 3 hrs to fix

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

                      function Plugin(option) {
                        return this.each(function () {
                          var $this = $(this)
                          var data  = $this.data('bs.alert')
                    
                    
                    public/assets/application-404f4a61b35c93d3441d4475969d79cc4182aff2126750b4beaab13f73340f19.js on lines 12116..12124

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

                    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

                      function Plugin(option) {
                        return this.each(function () {
                          var $this = $(this)
                          var data  = $this.data('bs.dropdown')
                    
                    
                    public/assets/application-404f4a61b35c93d3441d4475969d79cc4182aff2126750b4beaab13f73340f19.js on lines 11687..11695

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

                    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 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
                      Category
                      Status
                      Source
                      Language