Showing 403 of 403 total issues
File jquery.handsontable.full.js
has 11676 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Handsontable 0.11.0-beta3
* Handsontable is a simple jQuery plugin for editable tables with basic copy-paste compatibility with Excel and Google Docs
*
* Copyright 2012-2014 Marcin Warpechowski
Function Core
has 1252 lines of code (exceeds 25 allowed). Consider refactoring. Open
Handsontable.Core = function (rootElement, userSettings) {
var priv
, datamap
, grid
, selection
Function EditorManager
has 248 lines of code (exceeds 25 allowed). Consider refactoring. Open
Handsontable.EditorManager = function(instance, priv, selection){
var that = this;
var $document = $(document);
var keyCodes = Handsontable.helper.keyCode;
Function HandsontableColumnSorting
has 242 lines of code (exceeds 25 allowed). Consider refactoring. Open
function HandsontableColumnSorting() {
var plugin = this;
this.init = function (source) {
var instance = this;
Similar blocks of code found in 2 locations. Consider refactoring. Open
for (c = 0, clen = input.length, cmax = Math.max(clen, repeatCol); c < cmax; c++) {
if (c < clen) {
for (r = 0, rlen = input[c].length; r < repeatRow - rlen; r++) {
input[c].push(input[c][r % rlen]);
}
- 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 228.
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
for (r = 0, rlen = input.length, rmax = Math.max(rlen, repeatRow); r < rmax; r++) {
if (r < rlen) {
for (c = 0, clen = input[r].length; c < repeatCol - clen; c++) {
input[r].push(input[r][c % clen]);
}
- 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 228.
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
this.init = function (source) {
var instance = this;
var manualColumnWidthEnabled = !!(this.getSettings().manualColumnResize);
if (manualColumnWidthEnabled) {
- 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 224.
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
this.init = function (source) {
var instance = this;
var manualColumnHeightEnabled = !!(this.getSettings().manualRowResize);
- 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 224.
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 TableView
has 224 lines of code (exceeds 25 allowed). Consider refactoring. Open
Handsontable.TableView = function (instance) {
var that = this
, $window = $(window)
, $documentElement = $(document.documentElement);
Function ContextMenu
has 224 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ContextMenu(instance, customOptions){
this.instance = instance;
var contextMenu = this;
this.menu = createMenu();
Function modifyTransform
has 196 lines of code (exceeds 25 allowed). Consider refactoring. Open
MergeCells.prototype.modifyTransform = function (hook, currentSelectedRange, delta) {
var current;
switch (hook) {
case 'modifyTransformStart':
current = currentSelectedRange.highlight;
Function init
has 192 lines of code (exceeds 25 allowed). Consider refactoring. Open
var init = function () {
function onKeyDown(event) {
if (!instance.isListening()) {
Function PluginHookClass
has 185 lines of code (exceeds 25 allowed). Consider refactoring. Open
Handsontable.PluginHookClass = (function () {
var Hooks = function () {
return {
// Hooks
Function HandsontableManualRowMove
has 161 lines of code (exceeds 25 allowed). Consider refactoring. Open
function HandsontableManualRowMove() {
var pressed,
startRow,
endRow,
Function HandsontableManualColumnMove
has 158 lines of code (exceeds 25 allowed). Consider refactoring. Open
function HandsontableManualColumnMove() {
var pressed
, startCol
, endCol
, startX
Function HandsontableManualRowResize
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
function HandsontableManualRowResize () {
var pressed
, currentTH
, currentRow
Function HandsontableManualColumnResize
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
function HandsontableManualColumnResize() {
var pressed
, currentTH
, currentCol
, currentWidth
Function onKeyDown
has 139 lines of code (exceeds 25 allowed). Consider refactoring. Open
function onKeyDown(event) {
if (!instance.isListening()) {
return;
}
Function HandsontableObserveChanges
has 136 lines of code (exceeds 25 allowed). Consider refactoring. Open
(function HandsontableObserveChanges() {
Handsontable.hooks.add('afterLoadData', init);
Handsontable.hooks.add('afterUpdateSettings', init);
Function HandsontableAutoColumnSize
has 133 lines of code (exceeds 25 allowed). Consider refactoring. Open
function HandsontableAutoColumnSize() {
var plugin = this
, sampleCount = 5; //number of samples to take of each value length
this.beforeInit = function () {