Showing 223 of 433 total issues
Function datePicker
has 885 lines of code (exceeds 25 allowed). Consider refactoring. Open
function datePicker(options) {
this.defaults = {};
for(opt in options) { this[opt] = this.defaults[opt] = options[opt]; };
File datepicker.js
has 1113 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
DatePicker v4.4 by frequency-decoder.com
Released under a creative commons Attribution-ShareAlike 2.5 license (http://creativecommons.org/licenses/by-sa/2.5/)
File popup.js
has 928 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Copyright (c)2005-2009 Matt Kruse (javascripttoolbox.com)
*
* Dual licensed under the MIT and GPL licenses.
* This basically means you can use this code however you want for
Function Position
has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring. Open
var Position = (function() {
// Resolve a string identifier to an object
// ========================================
function resolveObject(s) {
if (document.getElementById && document.getElementById(s)!=null) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function CSS
has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring. Open
var CSS = (function(){
var css = {};
// Convert an RGB string in the form "rgb (255, 255, 255)" to "#ffffff"
css.rgb2hex = function(rgbString) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File tablesort.js
has 616 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
TableSort revisited v5.0 by frequency-decoder.com
Released under a creative commons Attribution-ShareAlike 2.5 license (http://creativecommons.org/licenses/by-sa/2.5/)
Function DOM
has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring. Open
var DOM = (function() {
var dom = {};
// Get a parent tag with a given nodename
dom.getParentByTagName = function(o,tagNames) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function undo
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
function undo() {
// skip if this is the first word!
var ti = this.currentTextIndex;
var wi = this.currentWordIndex
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function undo
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
function undo() {
// skip if this is the first word!
var ti = this.currentTextIndex;
var wi = this.currentWordIndex
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function Screen
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
var Screen = (function() {
var screen = {};
// Get a reference to the body
// --------------------------------------------------------------------
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Class Base
has 42 methods (exceeds 20 allowed). Consider refactoring. Open
class Base
attr_reader :messages
FIELD_DESCRIPTIONS = {}
def initialize file_name, district
@district = district
Class District
has 39 methods (exceeds 20 allowed). Consider refactoring. Open
class District < ActiveRecord::Base
# ActiveSupport::Dependencies.load_missing_constant self, :StudentsController
SETTINGS = [:key, :previous_key, :custom_interventions ]
BOOLEAN_SETTINGS = [:restrict_free_lunch, :forgot_password, :lock_tier, :email_on_team_consultation_response, :show_team_consultations_if_pending]
Function init
has 126 lines of code (exceeds 25 allowed). Consider refactoring. Open
init: function(tableId) {
if (!document.getElementsByTagName || !document.createElement || !document.getElementById) return;
var tables = tableId && document.getElementById(tableId) ? [document.getElementById(tableId)] : document.getElementsByTagName("table");
var c, ii, len, colMatch, showOnly, match, showArrow, columnNumSortObj, obj, workArr, headers, thtext, aclone, multi, colCnt, cel, allRowArr, rowArr, sortableTable, celCount, colspan, rowspan, rowLength;
Function create
has 125 lines of code (exceeds 25 allowed). Consider refactoring. Open
o.create = function() {
function createTH(details) {
var th = document.createElement('th');
if(details.thClassName) th.className = details.thClassName;
Function CSS
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
var CSS = (function(){
var css = {};
// Convert an RGB string in the form "rgb (255, 255, 255)" to "#ffffff"
css.rgb2hex = function(rgbString) {
Function formatResult
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
formatResult: function(result) {
var type = IEConsole.getType(result);
try {
// DOM Element
if (type == 'DOMElement') {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function Position
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Position = (function() {
// Resolve a string identifier to an object
// ========================================
function resolveObject(s) {
if (document.getElementById && document.getElementById(s)!=null) {
Function Sort
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
})();var Sort = (function(){
var sort = {};
sort.AlphaNumeric = function(a,b) {
if (a==b) { return 0; }
if (a<b) { return -1; }
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function updateTable
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
o.updateTable = function(noCallback) {
if(o.timerSet) {
var d = new Date(o.date);
d.setDate( Math.min(d.getDate()+o.dayInc, datePicker.getDaysPerMonth(d.getMonth()+o.monthInc,d.getFullYear()+o.yearInc)) );
File spellChecker.js
has 334 lines of code (exceeds 250 allowed). Consider refactoring. Open
////////////////////////////////////////////////////
// spellChecker.js
//
// spellChecker object
//