skandragon/thing

View on GitHub

Showing 175 of 175 total issues

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

        this.component = this.element.is('.date') ? ( this.bootcssVer == 3 ? this.element.find('.input-group-addon .glyphicon-th, .input-group-addon .glyphicon-time, .input-group-addon .glyphicon-calendar').parent() : this.element.find('.add-on .icon-th, .add-on .icon-time, .add-on .icon-calendar').parent()) : false;
app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 59..59

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

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.componentReset = this.element.is('.date') ? ( this.bootcssVer == 3 ? this.element.find('.input-group-addon .glyphicon-remove').parent() : this.element.find('.add-on .icon-remove').parent()) : false;
app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 58..58

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

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

def render_extra(pdf, opts)
  rowoffset = opts[:rowoffset]

  #box = pdf.grid([rowoffset, 0], [pdf.grid.rows - 1, pdf.grid.columns - 1])
  box = pdf.grid([rowoffset, 0], [rowoffset + 0.2, pdf.grid.columns - 1])
Severity: Major
Found in sched.rb - About 2 hrs to fix

    Method draw_hour_labels has 54 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    def draw_hour_labels(pdf, opts)
      opts[:hour_labels].count.times do |timeindex|
        opts[:location_labels].count.times do |locindex|
          y1 = @header_height + locindex * @row_height
          x1 = @location_label_width + timeindex * @column_width
    Severity: Major
    Found in sched.rb - About 2 hrs to fix

      Method initialize has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def initialize(user)
          @allow_all = false
          @allowed_actions = {}
      
          allow 'devise/sessions', :all
      Severity: Major
      Found in app/lib/permission.rb - About 2 hrs to fix

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

          def materials_and_handout_content(instructable)
            materials = []
            handout = []
            handout << "limit: #{instructable.handout_limit}" if instructable.handout_limit
            materials << "limit: #{instructable.material_limit}" if instructable.material_limit
        Severity: Major
        Found in app/lib/calendar_renderer.rb and 1 other location - About 2 hrs to fix
        sched.rb on lines 632..647

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

        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

        def materials_and_handout_content(instructable)
          materials = []
          handout = []
          handout << "limit: #{instructable.handout_limit}" if instructable.handout_limit
          materials << "limit: #{instructable.material_limit}" if instructable.material_limit
        Severity: Major
        Found in sched.rb and 1 other location - About 2 hrs to fix
        app/lib/calendar_renderer.rb on lines 366..381

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

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

        def render_notes(pdf, opts)
          rowoffset = opts[:rowoffset]
          draw_lines = opts[:mode] == :notes
          draw_box = opts[:mode] == :doodles
        
        
        Severity: Minor
        Found in sched.rb - About 1 hr to fix

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

                              if (this.dateWithinRange(newDate)) {
                                  this.date = newDate;
                                  this.viewDate = newViewDate;
                                  this.setValue();
                                  this.update();
          app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 1148..1155

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

          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 (this.dateWithinRange(newDate)) {
                                  this.date = newDate;
                                  this.viewDate = newViewDate;
                                  this.setValue();
                                  this.update();
          app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 1108..1115

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

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

            def render_ics(options, filename, cache_filename = nil)
              @options = options
              @options = {} if options.nil?
              @options.reverse_merge!({
                calendar_name: "Pennsic #{Pennsic.year} Master Schedule",
          Severity: Minor
          Found in app/lib/calendar_renderer.rb - About 1 hr to fix

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

                    if ('wheelViewModeNavigationInverseDirection' in options) {
                        this.wheelViewModeNavigationInverseDirection = options.wheelViewModeNavigationInverseDirection;
                    } else if ('wheelViewModeNavigationInverseDirection' in this.element.data()) {
                        this.wheelViewModeNavigationInverseDirection = this.element.data('view-mode-wheel-navigation-inverse-dir');
                    }
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 74..78
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 81..85
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 89..93
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 97..101
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 112..116
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 119..123
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 128..132
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 136..140
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 182..186
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 189..193

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

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

                    if ('forceParse' in options) {
                        this.forceParse = options.forceParse;
                    } else if ('dateForceParse' in this.element.data()) {
                        this.forceParse = this.element.data('date-force-parse');
                    }
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 74..78
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 81..85
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 89..93
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 97..101
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 105..109
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 112..116
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 119..123
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 128..132
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 182..186
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 189..193

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

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

                    if ('formatViewType' in options) {
                        this.formatViewType = options.formatViewType;
                    } else if ('formatViewType' in this.element.data()) {
                        this.formatViewType = this.element.data('formatViewType');
                    }
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 81..85
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 89..93
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 97..101
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 105..109
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 112..116
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 119..123
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 128..132
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 136..140
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 182..186
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 189..193

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

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

                    if ('wheelViewModeNavigation' in options) {
                        this.wheelViewModeNavigation = options.wheelViewModeNavigation;
                    } else if ('wheelViewModeNavigation' in this.element.data()) {
                        this.wheelViewModeNavigation = this.element.data('view-mode-wheel-navigation');
                    }
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 74..78
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 81..85
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 89..93
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 105..109
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 112..116
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 119..123
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 128..132
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 136..140
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 182..186
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 189..193

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

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

                    if ('minView' in options) {
                        this.minView = options.minView;
                    } else if ('minView' in this.element.data()) {
                        this.minView = this.element.data('min-view');
                    }
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 74..78
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 89..93
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 97..101
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 105..109
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 112..116
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 119..123
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 128..132
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 136..140
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 182..186
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 189..193

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

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

                    if ('startView' in options) {
                        this.startViewMode = options.startView;
                    } else if ('startView' in this.element.data()) {
                        this.startViewMode = this.element.data('start-view');
                    }
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 74..78
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 81..85
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 89..93
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 97..101
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 105..109
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 112..116
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 128..132
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 136..140
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 182..186
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 189..193

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

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

                    if ('wheelViewModeNavigationDelay' in options) {
                        this.wheelViewModeNavigationDelay = options.wheelViewModeNavigationDelay;
                    } else if ('wheelViewModeNavigationDelay' in this.element.data()) {
                        this.wheelViewModeNavigationDelay = this.element.data('view-mode-wheel-navigation-delay');
                    }
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 74..78
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 81..85
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 89..93
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 97..101
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 105..109
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 119..123
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 128..132
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 136..140
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 182..186
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 189..193

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

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

                    if ('viewSelect' in options) {
                        this.viewSelect = options.viewSelect;
                    } else if ('viewSelect' in this.element.data()) {
                        this.viewSelect = this.element.data('view-select');
                    }
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 74..78
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 81..85
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 89..93
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 97..101
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 105..109
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 112..116
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 119..123
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 136..140
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 182..186
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 189..193

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

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

                    if ('keyboardNavigation' in options) {
                        this.keyboardNavigation = options.keyboardNavigation;
                    } else if ('dateKeyboardNavigation' in this.element.data()) {
                        this.keyboardNavigation = this.element.data('date-keyboard-navigation');
                    }
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 74..78
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 81..85
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 89..93
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 97..101
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 105..109
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 112..116
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 119..123
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 128..132
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 136..140
            app/assets/javascripts/datetimepicker/bootstrap-datetimepicker.js on lines 182..186

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

            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