rubycentral/cfp-app

View on GitHub

Showing 126 of 126 total issues

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

    Spectral: {
      type: 'diverging',
      cbf: 0,
      3: ['fc8d59', 'ffffbf', '99d594'],
      4: ['d7191c', 'fdae61', 'abdda4', '2b83ba'],
Severity: Major
Found in app/assets/javascripts/palette.js and 8 other locations - About 4 hrs to fix
app/assets/javascripts/palette.js on lines 1188..1205
app/assets/javascripts/palette.js on lines 1206..1223
app/assets/javascripts/palette.js on lines 1224..1241
app/assets/javascripts/palette.js on lines 1242..1259
app/assets/javascripts/palette.js on lines 1260..1277
app/assets/javascripts/palette.js on lines 1278..1295
app/assets/javascripts/palette.js on lines 1296..1313
app/assets/javascripts/palette.js on lines 1332..1349

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

    RdGy: {
      type: 'diverging',
      cbf: 42,
      3: ['ef8a62', 'ffffff', '999999'],
      4: ['ca0020', 'f4a582', 'bababa', '404040'],
Severity: Major
Found in app/assets/javascripts/palette.js and 8 other locations - About 4 hrs to fix
app/assets/javascripts/palette.js on lines 1188..1205
app/assets/javascripts/palette.js on lines 1206..1223
app/assets/javascripts/palette.js on lines 1224..1241
app/assets/javascripts/palette.js on lines 1242..1259
app/assets/javascripts/palette.js on lines 1260..1277
app/assets/javascripts/palette.js on lines 1296..1313
app/assets/javascripts/palette.js on lines 1314..1331
app/assets/javascripts/palette.js on lines 1332..1349

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

Class ProposalDecorator has 36 methods (exceeds 20 allowed). Consider refactoring.
Open

class ProposalDecorator < ApplicationDecorator
  include Proposal::State
  decorates :proposal
  delegate_all
  decorates_association :speakers
Severity: Minor
Found in app/decorators/proposal_decorator.rb - About 4 hrs to fix

    Class Event has 36 methods (exceeds 20 allowed). Consider refactoring.
    Open

    class Event < ApplicationRecord
      has_many :teammates, dependent: :destroy
      has_many :staff, through: :teammates, source: :user
      has_many :proposals, dependent: :destroy
      has_many :speakers
    Severity: Minor
    Found in app/models/event.rb - About 4 hrs to fix

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

              success: function(data) {
                $(".unscheduled-sessions-toggle .badge").text(
                  data.unscheduled_count + "/" + data.total_count
                )
                $(".total.time-slots .badge").each(function(i, badge) {
      Severity: Major
      Found in app/assets/javascripts/staff/program/schedule_dragging.js and 1 other location - About 4 hrs to fix
      app/assets/javascripts/staff/program/grid.js on lines 162..170

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

      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

            success: function(data) {
              $(".unscheduled-sessions-toggle .badge").text(
                data.unscheduled_count + "/" + data.total_count
              )
              $(".total.time-slots .badge").each(function(i, badge) {
      Severity: Major
      Found in app/assets/javascripts/staff/program/grid.js and 1 other location - About 4 hrs to fix
      app/assets/javascripts/staff/program/schedule_dragging.js on lines 106..114

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

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

        render() {
          let { sessionFormats, closeBulkTimeSlotModal, counts } = this.props;
          let { timeError, day, startTimes, duration } = this.state;
      
          const days = Object.keys(counts);
      Severity: Major
      Found in app/javascript/components/Schedule/BulkCreateModal.js - About 4 hrs to fix

        Function Scheme has 101 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          palette.Scheme = function(name, opt_groups) {
            /**
             * A map from a number to a colour palettes with given number of colours.
             * @type {!Object<number, palette.Palette>}
             */
        Severity: Major
        Found in app/assets/javascripts/palette.js - About 4 hrs to fix

          Class ApplicationController has 32 methods (exceeds 20 allowed). Consider refactoring.
          Open

          class ApplicationController < ActionController::Base
            include Pundit::Authorization
            include ActivateNavigation
            rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized
          
          
          Severity: Minor
          Found in app/controllers/application_controller.rb - About 4 hrs to fix

            Function render has 98 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              render() {
                const { slot, matchedSession, unscheduledSessions, tracks, sessionFormats, roomName } = this.props;
            
                const { sessionSelected } = this.state;
            
            
            Severity: Major
            Found in app/javascript/components/Schedule/TimeSlotModal.js - About 3 hrs to fix

              File Schedule.js has 320 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import React, { Component } from 'react';
              import PropTypes from 'prop-types';
              
              import { Nav } from './Schedule/Nav';
              import { Ruler } from './Schedule/Ruler';
              Severity: Minor
              Found in app/javascript/components/Schedule.js - About 3 hrs to fix

                Function render has 88 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  render() {
                    const {
                      counts,
                      dayViewing,
                      startTime,
                Severity: Major
                Found in app/javascript/components/Schedule.js - About 3 hrs to fix

                  Class TimeSlotDecorator has 28 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                  class Staff::TimeSlotDecorator < Draper::Decorator
                    decorates :time_slot
                    delegate_all
                  
                    def start_time
                  Severity: Minor
                  Found in app/decorators/staff/time_slot_decorator.rb - About 3 hrs to fix

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

                        YlOrRd: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['ffeda0', 'feb24c', 'f03b20'],
                          4: ['ffffb2', 'fecc5c', 'fd8d3c', 'e31a1c'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        YlGnBu: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['edf8b1', '7fcdbb', '2c7fb8'],
                          4: ['ffffcc', 'a1dab4', '41b6c4', '225ea8'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        Greens: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['e5f5e0', 'a1d99b', '31a354'],
                          4: ['edf8e9', 'bae4b3', '74c476', '238b45'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        BuPu: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['e0ecf4', '9ebcda', '8856a7'],
                          4: ['edf8fb', 'b3cde3', '8c96c6', '88419d'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        OrRd: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['fee8c8', 'fdbb84', 'e34a33'],
                          4: ['fef0d9', 'fdcc8a', 'fc8d59', 'd7301f'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        Oranges: {
                          type: 'sequential',
                          cbf: 42,
                          3: ['fee6ce', 'fdae6b', 'e6550d'],
                          4: ['feedde', 'fdbe85', 'fd8d3c', 'd94701'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1394..1407
                    app/assets/javascripts/palette.js on lines 1420..1433

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

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

                        Pastel1: {
                          type: 'qualitative',
                          cbf: 0,
                          3: ['fbb4ae', 'b3cde3', 'ccebc5'],
                          4: ['fbb4ae', 'b3cde3', 'ccebc5', 'decbe4'],
                    Severity: Major
                    Found in app/assets/javascripts/palette.js and 19 other locations - About 3 hrs to fix
                    app/assets/javascripts/palette.js on lines 936..949
                    app/assets/javascripts/palette.js on lines 950..963
                    app/assets/javascripts/palette.js on lines 964..977
                    app/assets/javascripts/palette.js on lines 978..991
                    app/assets/javascripts/palette.js on lines 992..1005
                    app/assets/javascripts/palette.js on lines 1006..1019
                    app/assets/javascripts/palette.js on lines 1020..1033
                    app/assets/javascripts/palette.js on lines 1034..1047
                    app/assets/javascripts/palette.js on lines 1048..1061
                    app/assets/javascripts/palette.js on lines 1062..1075
                    app/assets/javascripts/palette.js on lines 1076..1089
                    app/assets/javascripts/palette.js on lines 1090..1103
                    app/assets/javascripts/palette.js on lines 1104..1117
                    app/assets/javascripts/palette.js on lines 1118..1131
                    app/assets/javascripts/palette.js on lines 1132..1145
                    app/assets/javascripts/palette.js on lines 1146..1159
                    app/assets/javascripts/palette.js on lines 1160..1173
                    app/assets/javascripts/palette.js on lines 1174..1187
                    app/assets/javascripts/palette.js on lines 1420..1433

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

                    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