Showing 3,654 of 3,654 total issues
Function DeskNotifications
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function DeskNotifications(desks, deskNotifications, authoringWorkspace: AuthoringWorkspaceService, $timeout) {
return {
scope: {stage: '=stage'},
templateUrl: 'scripts/apps/monitoring/views/desk-notifications.html',
link: function(scope) {
Function render
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
item,
title,
removeButton,
Function handleKey
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
handleKey(event) {
const {scope} = this.props;
const {Keys} = this.props.svc;
let diff;
Function link
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function(scope) {
init();
scope.$watch('item.lock_session', () => {
init();
Function updateItemAssociation
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
updateItemAssociation(scope, updated, customRel, callback = null, autosave = false): Promise<boolean> {
let data = {};
// if the media is of type media-gallery, update same association-key not the next one
// as the scope.rel contains the next association-key of the new item
let associationKey = scope.carouselItem ? scope.carouselItem.fieldId : customRel || scope.rel;
Function link
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function(scope: IScope) {
scope.closeModal = () => {
scope.cancelEditingSubscription();
};
Function render
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
field,
label,
placeholder,
Function TimezoneDirective
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function TimezoneDirective(tzdata, $timeout) {
return {
templateUrl: 'scripts/core/ui/views/sd-timezone.html',
scope: {
timezone: '=',
Function render
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<div
style={{
display: 'flex',
Function focusFirstChildInput
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export function focusFirstChildInput(parent: HTMLElement) {
const loadingStartTimestamp = Date.now();
let lastElementCount = 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 getDifferenceStatistics
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export function getDifferenceStatistics<T>(
items1: Array<T>,
items2: Array<T>,
getId: (item: T) => string,
isEqual: (item1: T, item2: T) => boolean,
- 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 handleDragDrop
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private handleDragDrop(event): void {
const superdeskType = getSuperdeskType(event);
const {config} = this.props;
if (superdeskType == 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 ProductionTestController
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export function ProductionTestController($scope, contentFilters, notify, $location, $window) {
$scope.preview = null;
$scope.selected = {};
$scope.selectedItem = {};
$scope.selectedfilter = 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 init
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
init(props) {
let value;
let title;
let altTitle;
let item;
- 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 ItemRendition
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export function ItemRendition() {
return {
templateUrl: 'scripts/apps/archive/views/item-rendition.html',
scope: {
item: '=',
- 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 HighlightsConfig
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export function HighlightsConfig($scope, highlightsService, desks, api, notify, modal) {
highlightsService.get().then((items) => {
items._items = _.sortBy(items._items, (i) => i.name.toLowerCase());
$scope.configurations = items;
});
- 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 updateItemAssociation
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
updateItemAssociation(scope, updated, customRel, callback = null, autosave = false): Promise<boolean> {
let data = {};
// if the media is of type media-gallery, update same association-key not the next one
// as the scope.rel contains the next association-key of the new item
let associationKey = scope.carouselItem ? scope.carouselItem.fieldId : customRel || scope.rel;
- 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 MultieditService
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function MultieditService(storage, superdesk, authoringWorkspace: AuthoringWorkspaceService, referrer, $location) {
// 1. Service manages multiedit screen
// 2. Screen has it's boards, at least 2 of them
// 3. Every board can be popuplated with one content item
- 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 ItemGlobalSearch
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export function ItemGlobalSearch(
session, api, notify, keyboardManager, asset, authoringWorkspace: AuthoringWorkspaceService, authoring,
) {
return {
scope: {repo: '=', context: '='},
- 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 getSelectSingleValueAutoComplete
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export function getSelectSingleValueAutoComplete(
options: {
query: (searchString: string, props: IProps) => Promise<IRestApiResponse<any>>;
queryById: (id: string) => Promise<any>;
getPlaceholder: (props: IProps) => string;
- 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"