Showing 3,654 of 3,654 total issues
Function getMultiActions
has 312 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getMultiActions(
getSelectedItems: () => Array<IArticle>,
unselectAll: () => void,
) {
const $location = ng.get('$location');
File rundown-view-edit.tsx
has 681 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable react/no-multi-comp */
import * as React from 'react';
import {
IRundown,
File highlights.ts
has 679 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {RichUtils, EditorState} from 'draft-js';
import {getHighlightsConfig} from '../highlightsConfig';
import {editor3DataKeys, getCustomDataFromEditor, setCustomDataForEditor__deprecated} from './editor3CustomData';
import {getDraftCharacterListForSelection} from './getDraftCharacterListForSelection';
import {getDraftSelectionForEntireContent} from './getDraftSelectionForEntireContent';
File monitoring.ts
has 679 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable newline-per-chained-call */
import {
element, by, browser, protractor, ElementFinder, promise as wdpromise, ExpectedConditions as EC,
} from 'protractor';
Function render
has 301 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<Layout.AuthoringFrame
header={(
<SubNav>
File VideoEditor.tsx
has 666 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import * as React from 'react';
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import ReactCrop from 'react-image-crop';
import 'react-image-crop/dist/ReactCrop.css';
Function DesksFactory
has 299 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function DesksFactory($q, api, preferencesService, userList, notify,
session, $filter, privileges, $rootScope) {
let _cache = {};
var _fetchAll = function(endpoint, parent?, page = 1, items = [], refresh = false) {
Function TemplatesDirective
has 299 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function TemplatesDirective(notify, api, templates, modal, desks, weekdays, content, $filter, session, _) {
return {
templateUrl: 'scripts/apps/templates/views/templates.html',
link: function($scope) {
const TEMPLATEFILTERS = getTemplateFilters();
Function MetaTermsDirective
has 298 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function MetaTermsDirective(metadata, $filter, $timeout, preferencesService, desks) {
return {
scope: {
item: '=',
field: '@',
Function link
has 294 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function($scope) {
const TEMPLATEFILTERS = getTemplateFilters();
$scope.weekdays = weekdays;
$scope.content_templates = null;
File AuthoringService.ts
has 651 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import _, {cloneDeep} from 'lodash';
import {flatMap} from 'lodash';
import * as helpers from 'apps/authoring/authoring/helpers';
import {gettext} from 'core/utils';
import {logger} from 'core/services/logger';
Function UploadController
has 290 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function UploadController(
$scope,
$q,
upload,
api,
Function CardsService
has a Cognitive Complexity of 71 (exceeds 5 allowed). Consider refactoring. Open
Open
export function CardsService(search, session, desks, $location) {
this.criteria = getCriteria;
this.shouldUpdate = shouldUpdate;
function getCriteriaParams(card: ICard): IQueryParams {
- 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 getBulkActions
has 274 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getBulkActions(
articles: Array<IArticle>,
multiActions: IMultiActions,
getSelectedItems: () => Array<IArticle>,
unselectAll: () => void,
Function initialize
has 274 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
initialize($element, editor3, $scope, $rootScope) {
if (this.item == null) {
throw new Error(
'Item must be provided in order to be able to save editor_state on it',
);
Function MetaTermsDirectiveLink
has 273 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function MetaTermsDirectiveLink(scope, elem, attrs) {
metadata.subjectScope = scope;
scope.getLocaleName = metadata.getLocaleName;
const reloadList = scope.reloadList === 'true';
const includeParent = scope.includeParent === 'true';
File ProfileDetail.tsx
has 620 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import {get, set, isEmpty, findKey, orderBy, map} from 'lodash';
Function render
has 270 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {template, showId} = this.state;
const viewEditToolbar = template == null || template.type === 'create' ? null : (
<WithLiveResources
Function ChangeImageController
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
Open
export function ChangeImageController($scope, notify, _, api, $rootScope, $q, content) {
$scope.data = $scope.locals.data;
$scope.data.cropData = {};
$scope.validator = appConfig.validator_media_metadata;
const sizes = {};
- 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 getSuperdeskApiImplementation
has 263 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getSuperdeskApiImplementation(
requestingExtensionId: string,
extensions: IExtensions,
modal,
privileges,