Showing 392 of 1,004 total issues
Function BeforeAfter
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function BeforeAfter(configuration) {
const {
isActive,
load,
before_label,
Function AudioPlayer
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const AudioPlayer = function(sources, options) {
options = options || {};
var codecMapping = {
vorbis: 'audio/ogg',
Function Scroller
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function Scroller({
visibleIndex, setVisibleIndex,
displayFullscreenToggle,
customMargin,
onFullscreenEnter, onFullscreenExit,
- 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 Counter
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
export function Counter({configuration, contentElementId, contentElementWidth, sectionProps}) {
const updateConfiguration = useContentElementConfigurationUpdate();
const locale = useLocale();
const {t} = useI18n({locale: 'ui'});
- 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 Agent
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
export const Agent = function(userAgent) {
return {
matchesSilk: function() {
return matches(/\bSilk\b/);
},
- 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 reducer
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function reducer(state, action) {
const collectionName = action.payload.collectionName;
const keyAttribute = action.payload.keyAttribute;
switch (action.type) {
Method build
has 71 lines of code (exceeds 25 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)
File collections.js
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {useReducer} from 'react';
import {createSelector, createSelectorCreator, defaultMemoize} from 'reselect';
const PREFIX = 'PAGEFLOW_SCROLLED_COLLECTION';
const RESET = `${PREFIX}_RESET`;
Function MultiPlayer
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export const MultiPlayer = function(pool, options) {
if (options.crossFade && options.playFromBeginning) {
throw 'pageflow.Audio.MultiPlayer: The options crossFade and playFromBeginning can not be used together at the moment.';
}
- 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 Viewer
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
export default function Viewer({
imageFile, viewerRef, initialYaw, initialPitch, hidePanoramaIndicator, onReady, onFullscreen
}) {
const elRef = useRef();
- 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 componentDidUpdate
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
componentDidUpdate(prevProps) {
// update audioFile
if (this.props.audioFile !== this.props.audioFile) {
this._loadAudio(this.props.audioFile, this.props.audioPeaks);
}
- 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 _initDragGestureBump
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
_initDragGestureBump: function() {
var allowUp = false,
allowDown = false,
allowLeft = false,
allowRight = false,
Function validate
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
validate: function(success) {
var view = this;
var options = this.options;
var value = this.ui.input.val();
Function onRender
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
onRender: function() {
var view = this,
options = this.options;
SelectInputView.prototype.onRender.apply(this, arguments);
Function prebuffering
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const prebuffering = function(player) {
let prebufferPromiseReject;
player.isBufferedAhead = function(delta, silent) {
// video.js only gives us one time range starting from 0 here. We
Method initialize
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(target_type_name = nil)
@target_type_name = target_type_name
@paperclip_attachments_version = 'v1'
@paperclip_s3_root = 'main'
Function default
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function(pageflow) {
const isEditor = !!pageflow.storylines;
const isServerSide = !pageflow.settings;
const seed = pageflow.seed;
Function componentDidMount
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
componentDidMount() {
const options = assign({}, this.props.options, {
container: this.wavesurferEl
});
Function sources
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function sources(videoFile, quality = 'auto') {
if (typeof window !== 'undefined') {
if (!browser.has('video')) {
return [];
}
File appearance-stories.js
has 268 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import {
Entry, RootProviders,
contentElementWidths, contentElementWidthName,