Showing 1,230 of 1,230 total issues
File sortable.js
has 2871 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**!
* Sortable 1.10.2
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
File spectrum.js
has 1808 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Spectrum Colorpicker v1.8.0
// https://github.com/bgrins/spectrum
// Author: Brian Grinstead
// License: MIT
Function spectrum
has 625 lines of code (exceeds 25 allowed). Consider refactoring. Open
function spectrum(element, o) {
var opts = instanceOptions(o, element),
flat = opts.flat,
showSelectionPalette = opts.showSelectionPalette,
Similar blocks of code found in 2 locations. Consider refactoring. Open
window.ST.initializeTransactionSearchFormSelector = function() {
$(".status-select-button").click(function(){
$(".status-select-dropdown").show();
setTimeout(function() { document.addEventListener('mousedown', outsideClickListener);}, 300);
});
- Read upRead up
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 440.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
window.ST.initializeTestimonialSearchFormSelector = function() {
$(".status-select-button").click(function(){
$(".status-select-dropdown").show();
setTimeout(function() { document.addEventListener('mousedown', outsideClickListener);}, 300);
});
- Read upRead up
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 440.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function MultiDragPlugin
has 463 lines of code (exceeds 25 allowed). Consider refactoring. Open
function MultiDragPlugin() {
function MultiDrag(sortable) {
// Bind all private methods
for (var fn in this) {
if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
File kassi.js
has 757 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Custom Javascript functions for Sharetribe
// Add custom validation methods
function add_validator_methods() {
Similar blocks of code found in 2 locations. Consider refactoring. Open
const listingCardTemplate = (title, perUnit, price, distance) => (
r(ListingCard,
{
color: '#347F9D',
listing: new ListingModel({
- Read upRead up
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 310.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
const listingCardTemplate = (title, perUnit, price, distance) => (
r(ListingCard,
{
color: '#347F9D',
listing: new ListingModel({
- Read upRead up
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 310.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
File application_helper.rb
has 693 lines of code (exceeds 250 allowed). Consider refactoring. Open
module ApplicationHelper
# Removes whitespaces from HAML expressions
# if you add two elements on two lines; the white space creates a space between the elements (in some browsers)
def one_line_for_html_safe_content(&block)
Function imageUploader
has 295 lines of code (exceeds 25 allowed). Consider refactoring. Open
window.ST.imageUploader = function(listings, opts) {
var elementManager = ST.imageUploadElementManager($("#image-uploader-container"));
var directUploadToS3 = !!opts.s3Fields && !!opts.s3UploadPath;
var extraPlaceholders = 2;
File example_data.rb
has 574 lines of code (exceeds 250 allowed). Consider refactoring. Open
module CustomLandingPage
# rubocop:disable Metrics/ModuleLength
module ExampleData
# TODO Document the expected JSON structure here
Method admin_links_for
has 234 lines of code (exceeds 25 allowed). Consider refactoring. Open
def admin_links_for(community)
links = [
{
:topic => :general,
:text => t("admin.communities.getting_started.getting_started"),
Class PaymentSettingsPresenter
has 63 methods (exceeds 20 allowed). Consider refactoring. Open
class Person::PaymentSettingsPresenter
include Person::PaymentSettingsCommon
private
File googlemaps.js
has 547 lines of code (exceeds 250 allowed). Consider refactoring. Open
var directionsDisplay;
var directionsService;
var marker;
var geocoder;
var map;
Similar blocks of code found in 2 locations. Consider refactoring. Open
const winder = {
wrapper: this.props.sideWinderWrapper,
maxWidth: cssVariables['--ManageAvailability_maxWidth'],
minWidth: cssVariables['--ManageAvailability_minWidth'],
height: this.state.viewportHeight,
- Read upRead up
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 217.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
const winder = {
wrapper: this.props.sideWinderWrapper,
maxWidth: cssVariables['--ManageAvailabilityWorkingHours_maxWidth'],
minWidth: cssVariables['--ManageAvailability_minWidth'],
height: this.state.viewportHeight,
- Read upRead up
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 217.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Class Person
has 59 methods (exceeds 20 allowed). Consider refactoring. Open
class Person < ApplicationRecord
include ErrorsHelper
include ApplicationHelper
include DeletePerson
Method build_default_test_actions
has 203 lines of code (exceeds 25 allowed). Consider refactoring. Open
def build_default_test_actions
identity = -> (val, _) { val }
{
get_express_checkout_details: PaypalAction.def_action(
Function _onDragOver
has 201 lines of code (exceeds 25 allowed). Consider refactoring. Open
_onDragOver: function _onDragOver(
/**Event*/
evt) {
var el = this.el,
target = evt.target,