Showing 407 of 1,024 total issues
Function useAutoCruising
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function useAutoCruising({viewerRef, onCancel}) {
const autoCruisingRef = useRef(false);
const rafIdRef = useRef();
const lastYawRef = useRef(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 PlayerWithControlBar
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function PlayerWithControlBar({
videoFile, posterImageFile,
inlineFileRightsItems,
playerState, playerActions,
contentElementId, configuration,
- 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 getPlayerClickHandler
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function getPlayerClickHandler({
configuration,
playerActions,
shouldPlay, lastControlledVia,
mediaMuted,
- 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 default
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export default function({scope = 'default'} = {}) {
return function reducer(state = {}, action) {
if (action.meta &&
action.meta.mediaScope &&
action.meta.mediaScope !== scope) {
- 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 textTrackPosition
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function textTrackPosition(state, {playerState, textTrackPosition}) {
if (textTrackPosition) {
return textTrackPosition;
}
- 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 Visited
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const Visited = function(entryId, pages, events, cookies) {
var cookieName = '_pageflow_visited';
var unvisitedPages = [];
- 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 updateRect
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function updateRect(editor, startIndex, endIndex, outer, el, inner) {
Function useBackdrop
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function useBackdrop(section) {
const videoBackdrop = useFileBackdrop({
section,
collectionName: 'videoFiles',
propertyName: 'video'
- 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 useBackdrop
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function useBackdrop({backdrop, backdropEffects, backdropEffectsMobile}) {
const videoFile = useBackdropFile({
permaId: backdrop.video,
collectionName: 'videoFiles',
motifArea: backdrop.videoMotifArea,
- 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 SectionDecorator
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function SectionDecorator({backdrop, section, contentElements, transitions, children}) {
const {t} = useI18n({locale: 'ui'});
const {isSelected, select, resetSelection} = useEditorSelection({
id: section.id,
- 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 render
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
render: function() {
var that = this;
this.$el.fileupload({
type: 'POST',
- 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 withLineBreakNormalization
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function withLineBreakNormalization(editor) {
const { normalizeNode } = editor;
editor.normalizeNode = ([node, path]) => {
if (path.length === 0 && editor.children.length > 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 DefaultNavigation
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function DefaultNavigation({configuration}) {
const [navExpanded, setNavExpanded] = useState(true);
const [mobileNavHidden, setMobileNavHidden] = useState(true);
const [readingProgress, setReadingProgress] = useState(0);
const chapters = useChapters();
- 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 allocatePlayer
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
allocatePlayer({
playerType, playerId, playsInline, mediaEventsContextData,
hooks, poster, loop = false, controls = false, altText,
onRelease
}) {
- 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 setItemCookieString
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
export function setItemCookieString(key, value, expiresOrOptions, path, domain, secure) {
Method build_folder_list
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def build_folder_list(folders)
ul(class: 'folders') do
folders.each do |folder|
li('data-id' => folder.id) do
text_node(link_to_folder(folder))
- 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 navigation_bar_css_class
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def navigation_bar_css_class(entry, options = {})
[
options[:class],
entry.home_button.enabled? ? 'with_home_button' : nil,
entry.overview_button.enabled? ? 'with_overview_button' : nil,
- 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 pageflow_default_abilities
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def pageflow_default_abilities(user)
return if user.nil?
can :read, Account, AccountPolicy::Scope.new(user, Account).resolve do |account|
AccountPolicy.new(user, account).read?
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
def build(site)
table_subjects = site.existing_and_potential_entry_templates
table_for(table_subjects, i18n: Pageflow::EntryTemplate) do
column do |entry_template|
- 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 call
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def call(image_file, entry:)
{
default: {
desktop: image_file.ready? ? image_file.attachment.url(desktop_style(entry)) : '',
mobile: image_file.ready? ? image_file.attachment.url(:medium) : ''
- 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"