Showing 346 of 346 total issues
Function fileUpload
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
function fileUpload() {
var form = $form[0];
if ($(':input[name=submit]', form).length) {
alert('Error: Form elements must not be named "submit".');
File jquery.form.js
has 424 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jQuery Form Plugin
* version: 2.43 (12-MAR-2010)
* @requires jQuery v1.3.2 or later
*
Function events
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
events: function () {
var self = this;
$(this.scope)
.on('click.fndtn.forms', 'form.custom span.custom.checkbox', function (e) {
File foundation.forms.js
has 401 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function ($, window, document, undefined) {
'use strict';
Foundation.libs.forms = {
name : 'forms',
Function reveal
has 139 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.reveal = function (options) {
var defaults = {
animation: 'fadeAndPop', // fade, fadeAndPop, none
animationSpeed: 300, // how fast animtions are
closeOnBackgroundClick: true, // if you click background will modal close?
Similar blocks of code found in 2 locations. Consider refactoring. Open
init : function (scope, method, options) {
this.scope = scope || this.scope;
Foundation.inherit(this, 'data_options');
if (typeof method === 'object') {
- 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 145.
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
init : function (scope, method, options) {
this.scope = scope || this.scope;
Foundation.inherit(this, 'throttle scrollLeft data_options');
if (typeof method === 'object') {
- 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 145.
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 foundation.clearing.js
has 394 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*jslint unparam: true, browser: true, indent: 2 */
;(function ($, window, document, undefined) {
'use strict';
File jquery.form.wizard.js
has 392 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* jQuery wizard plug-in 3.0.5
*
*
* Copyright (c) 2011 Jan Sundman (jan.sundman[at]aland.net)
Function display
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
display : function(eleAlignTo)
{
if ($(this.ele).is('.dp-disabled')) return;
eleAlignTo = eleAlignTo || this.ele;
File jquery-migrate-1.1.1.js
has 371 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* jQuery Migrate - v1.1.1 - 2013-02-16
* https://github.com/jquery/jquery-migrate
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors; Licensed MIT
*/
File foundation.orbit.js
has 369 lines of code (exceeds 250 allowed). Consider refactoring. Open
;(function ($, window, document, undefined) {
'use strict';
var noop = function() {};
Function events
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
events : function () {
var self = this;
$(this.scope)
.off('.fndtn.topbar')
.on('click.fndtn.topbar', '.top-bar .toggle-topbar, [data-topbar] .toggle-topbar', function (e) {
Function _init
has 111 lines of code (exceeds 25 allowed). Consider refactoring. Open
_init: function() {
var wizard = this;
var formOptionsSuccess = this.options.formOptions.success;
var formOptionsComplete = this.options.formOptions.complete;
Function resize
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
resize: function(sections, ensure_has_active_region) {
var self = Foundation.libs.section,
section_container = $(self.settings.section_selector),
is_small_window = self.small(section_container),
Function shift
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
shift: function (direction) {
var slideDirection = direction;
//remember previous activeSlide
this.prevActiveSlide = this.activeSlide;
Similar blocks of code found in 2 locations. Consider refactoring. Open
} else if (e.which === 40) {
var current = dropdown.find('li.selected'),
next = current.next(':not(.disabled)');
if (next.length > 0) {
- 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 117.
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
if (e.which === 38) {
var current = dropdown.find('li.selected'),
prev = current.prev(':not(.disabled)');
if (prev.length > 0) {
- 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 117.
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 foundation.js
has 337 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* Foundation Responsive Library
* http://foundation.zurb.com
* Copyright 2013, ZURB
* Free to use under the MIT license.
File order.rb
has 324 lines of code (exceeds 250 allowed). Consider refactoring. Open
class Order < ApplicationRecord
include AASM
extend FriendlyId
friendly_id :number
include Presentation::OrderPresenter