Showing 391 of 1,006 total issues
Function _create
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
var that = this,
scroller,
chapterParts = $('.ov_chapter', this.element),
pages = $('.ov_page', this.element),
Function _create
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
var player = this.options.player;
var playButton = this.element.find('.vjs-play-control');
var progressHolder = this.element.find('.vjs-progress-holder');
Function StorylineOrdering
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const StorylineOrdering = function(storylines, pages) {
var storylinesByParent;
this.watch = function() {
storylines.on('add change:configuration', function() {
Function Lazy
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const Lazy = function(template, options) {
var placeholder = $('<span class="video_placeholder" />'),
that = this,
readyCallbacks = new $.Callbacks(),
disposeTimeout, videoTag, videoPlayer, html;
Function _create
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
var parent = this.options.parent,
direction = this.element.data('direction'),
boundary = boundaries[direction],
that = this,
Function Slideshow
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
export const Slideshow = function($el, configurations) {
var transitioning = false,
currentPage = $(),
pages = $(),
that = this,
- 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 DomOrderScrollNavigator
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const DomOrderScrollNavigator = function(slideshow, entryData) {
this.getLandingPage = function(pages) {
return pages.first();
};
Function browser
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const browser = (function(){
var tests = {},
results = {},
featureDetectionComplete = false;
Function Batch
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
export function Batch(entry, section) {
// Shallow copy of the section's list of content elements to store
// ordering changes and newly inserted content elements.
const contentElements = section.contentElements.toArray();
- 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 build
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def build(entry)
embedded_index_table entry.revisions, :blank_slate_text => I18n.t('pageflow.admin.entries.no_revisions') do
scope(:publications)
scope(:publications_and_user_snapshots)
scope(:frozen)
- 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 onRender
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
onRender: function() {
var entry = this.model;
var state = this.options.state || {};
var features = this.options.features || {};
var editor = this.options.editor || {};
Function DomOrderScrollNavigator
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
export const DomOrderScrollNavigator = function(slideshow, entryData) {
this.getLandingPage = function(pages) {
return pages.first();
};
- 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 withVisibilityWatching
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
export default function withVisibilityWatching(Component) {
return class VisibilityWatcher extends React.Component {
constructor(props) {
super(props);
- 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 PageThumbnail-spec.jsx
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {PageThumbnail} from '../PageThumbnail';
import fileExistsFn from 'support/fileExistsFn';
import {shallow} from 'enzyme';
Class VideoFile
has 27 methods (exceeds 20 allowed). Consider refactoring. Open
class VideoFile < ApplicationRecord
include UploadableFile
include MediaEncodingStateMachine
include OutputSource
Class Revision
has 27 methods (exceeds 20 allowed). Consider refactoring. Open
class Revision < ApplicationRecord
include SerializedConfiguration
PAGE_ORDER = [
'pageflow_storylines.position ASC',
Class EntryPolicy
has 27 methods (exceeds 20 allowed). Consider refactoring. Open
class EntryPolicy < ApplicationPolicy
class Scope < Scope
attr_reader :user, :scope, :query
def initialize(user, scope)
File Wavesurfer.js
has 298 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import assign from 'deep-assign';
import Measure from 'react-measure';
Function _create
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
var that = this,
element = this.element,
scroller;
File rollup.config.js
has 292 lines of code (exceeds 250 allowed). Consider refactoring. Open
import alias from '@rollup/plugin-alias';
import jst from 'rollup-plugin-jst';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import replace from '@rollup/plugin-replace';