crmis/weddings

View on GitHub

Showing 334 of 334 total issues

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

        function updateEvent(event) { // update an existing event
            var i, len = cache.length, e,
                defaultEventEnd = getView().defaultEventEnd, // getView???
                startDelta = event.start - event._start,
                endDelta = event.end ?
Severity: Minor
Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

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

        $.ui.intersect = function (draggable, droppable, toleranceMode) {
    
            if (!droppable.offset) {
                return false;
            }
    Severity: Minor
    Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

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

          function getSkinCss(event, opt) {
              var source = event.source || {};
              var eventColor = event.color;
              var sourceColor = source.color;
              var optionColor = opt('eventColor');
      Severity: Minor
      Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

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

                    top: function (position, data) {
                        var within = data.within,
                            withinOffset = within.offset.top + within.scrollTop,
                            outerHeight = within.height,
                            offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
        Severity: Minor
        Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

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

                      this.offset = {
                          top: this.offset.top - this.margins.top,
                          left: this.offset.left - this.margins.left
                      };
          Severity: Major
          Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/viewable_calendar-editable.js on lines 1595..1598

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

          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

                      this.offset = {
                          top: this.offset.top - this.margins.top,
                          left: this.offset.left - this.margins.left
                      };
          Severity: Major
          Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/viewable_calendar-editable.js on lines 4242..4245

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

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

                  function _normalizeArguments(effect, options, speed, callback) {
          
                      // allow passing all options as the first parameter
                      if ($.isPlainObject(effect)) {
                          options = effect;
          Severity: Minor
          Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

            Function _refreshItems has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    _refreshItems: function (event) {
            
                        this.items = [];
                        this.containers = [this];
            
            
            Severity: Minor
            Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

              Function left has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          left: function (position, data) {
                              var within = data.within,
                                  withinOffset = within.offset.left + within.scrollLeft,
                                  outerWidth = within.width,
                                  offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
              Severity: Minor
              Found in app/assets/javascripts/viewable_calendar-editable.js - About 1 hr to fix

                Function HoverListener has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function HoverListener(coordinateGrid) {
                
                
                        var t = this;
                        var bindType;
                Severity: Minor
                Found in app/assets/javascripts/viewable_fullcalendar.js - About 1 hr to fix

                  Function calendar has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                  var calendar = function () {
                      // page is now ready, initialize the calendar...
                      var current_room = function () {
                          return window.location.href.match(/rooms\/(\d+)\/viewings/)[1];
                      };
                  Severity: Minor
                  Found in app/assets/javascripts/viewable_custom.js - About 1 hr 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

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

                      function vmargins(element) {
                          return (parseFloat($.css(element[0], 'marginTop', true)) || 0) +
                              (parseFloat($.css(element[0], 'marginBottom', true)) || 0);
                      }
                  Severity: Major
                  Found in app/assets/javascripts/viewable_fullcalendar.js and 4 other locations - About 1 hr to fix
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1785..1788
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1791..1794
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1797..1800
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1808..1811

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

                  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

                                  rgba: {
                                      props: {
                                          red: {
                                              idx: 0,
                                              type: "byte"
                  Severity: Major
                  Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 1 hr to fix
                  app/assets/javascripts/viewable_calendar-editable.js on lines 5473..5488

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

                  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

                                  hsla: {
                                      props: {
                                          hue: {
                                              idx: 0,
                                              type: "degrees"
                  Severity: Major
                  Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 1 hr to fix
                  app/assets/javascripts/viewable_calendar-editable.js on lines 5456..5471

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

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

                      function hpadding(element) {
                          return (parseFloat($.css(element[0], 'paddingLeft', true)) || 0) +
                              (parseFloat($.css(element[0], 'paddingRight', true)) || 0);
                      }
                  Severity: Major
                  Found in app/assets/javascripts/viewable_fullcalendar.js and 4 other locations - About 1 hr to fix
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1791..1794
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1797..1800
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1808..1811
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1814..1817

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

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

                      function hmargins(element) {
                          return (parseFloat($.css(element[0], 'marginLeft', true)) || 0) +
                              (parseFloat($.css(element[0], 'marginRight', true)) || 0);
                      }
                  Severity: Major
                  Found in app/assets/javascripts/viewable_fullcalendar.js and 4 other locations - About 1 hr to fix
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1785..1788
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1797..1800
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1808..1811
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1814..1817

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

                  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

                                      delayedTriggers.push((function (c) {
                                          return function (event) {
                                              c._trigger("update", event, this._uiHash(this));
                                          };
                                      }).call(this, this.currentContainer));
                  Severity: Major
                  Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 1 hr to fix
                  app/assets/javascripts/viewable_calendar-editable.js on lines 5268..5272

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

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

                      function hborders(element) {
                          return (parseFloat($.css(element[0], 'borderLeftWidth', true)) || 0) +
                              (parseFloat($.css(element[0], 'borderRightWidth', true)) || 0);
                      }
                  Severity: Major
                  Found in app/assets/javascripts/viewable_fullcalendar.js and 4 other locations - About 1 hr to fix
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1785..1788
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1791..1794
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1808..1811
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1814..1817

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

                  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

                                      delayedTriggers.push((function (c) {
                                          return function (event) {
                                              c._trigger("receive", event, this._uiHash(this));
                                          };
                                      }).call(this, this.currentContainer));
                  Severity: Major
                  Found in app/assets/javascripts/viewable_calendar-editable.js and 1 other location - About 1 hr to fix
                  app/assets/javascripts/viewable_calendar-editable.js on lines 5273..5277

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

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

                      function vpadding(element) {
                          return (parseFloat($.css(element[0], 'paddingTop', true)) || 0) +
                              (parseFloat($.css(element[0], 'paddingBottom', true)) || 0);
                      }
                  Severity: Major
                  Found in app/assets/javascripts/viewable_fullcalendar.js and 4 other locations - About 1 hr to fix
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1785..1788
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1791..1794
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1797..1800
                  app/assets/javascripts/viewable_fullcalendar.js on lines 1814..1817

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

                  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