Showing 463 of 531 total issues
Function report
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
itself.report = function (option) {
var data = itself.data();
var a = [], c, e, err, f, i, k, l, m = '', n, o = [], s;
Function report
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
itself.report = function (option) {
var data = itself.data();
var a = [], c, e, err, f, i, k, l, m = '', n, o = [], s;
Method show_page
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def show_page
params[:aspect] ||= 'subpages' if params[:path].to_s.ends_with? '/'
env['HTTP_ACCEPT'].to_s =~ %r{[\w\.\+\-\*]+/[\*\w\.\+\-]+}
preferred_mime = $&
- 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
Method cache_control
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def cache_control(options)
return if !Config['production']
if options[:no_cache]
response.headers.delete('ETag')
- 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 _start
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
_start: function (index) {
var coming = {},
obj,
href,
type,
Function open
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
open: function (group, opts) {
if (!group) {
return;
}
Function defaultPrefilter
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
function defaultPrefilter( elem, props, opts ) {
/*jshint validthis:true */
var prop, index, length,
value, dataShow, toggle,
tween, hooks, oldfire,
Function Selection
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Selection = (function() {
var hasRange = (typeof document.selection !== 'undefined' && typeof document.selection.createRange !== 'undefined');
return {
Function doOption
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
function doOption() {
var b, obj, filter, o = nexttoken.value, t, v;
switch (o) {
case '*/':
error("Unbegun comment.");
Function doOption
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
function doOption() {
var b, obj, filter, o = nexttoken.value, t, v;
switch (o) {
case '*/':
error("Unbegun comment.");
Method process_tag
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def process_tag(name, attrs, content, context)
tag = @@tags[name]
name = tag.full_name
tag_counter = context[:tag_counter] ||= {}
- 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 labelled
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
blockstmt('switch', function () {
var t = nexttoken,
g = false;
funct['(breakage)'] += 1;
advance('(');
Function labelled
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
blockstmt('switch', function () {
var t = nexttoken,
g = false;
funct['(breakage)'] += 1;
advance('(');
Function trigger
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
trigger: function( event, data, elem, onlyHandlers ) {
var handle, ontype, cur,
bubbleType, special, tmp, i,
eventPath = [ elem || document ],
type = core_hasOwn.call( event, "type" ) ? event.type : event,
Function _afterLoad
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
_afterLoad: function () {
var coming = F.coming,
previous = F.current,
placeholder = 'fancybox-placeholder',
current,
Function jsonValue
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
function jsonValue() {
function jsonObject() {
var o = {}, t = nexttoken;
advance('{');
Function jsonValue
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
function jsonValue() {
function jsonObject() {
var o = {}, t = nexttoken;
advance('{');
Function Animation
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Animation( elem, properties, options ) {
var result,
stopped,
index = 0,
length = animationPrefilters.length,
Function nud
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
nud: function () {
var v = this.value,
s = scope[v],
f;
if (typeof s === 'function') {
Function nud
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
nud: function () {
var v = this.value,
s = scope[v],
f;
if (typeof s === 'function') {