Showing 3,654 of 3,654 total issues
Function link
has 370 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function(scope, elem, attr, controller) {
var containerElem = elem.find('.shadow-list-holder');
var GRID_VIEW = 'mgrid',
LIST_VIEW = 'compact';
Function render
has 370 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {additionalProps} = this.props;
if (this.props.crudManager._items == null) {
// loading
Function MetaTermsDirective
has a Cognitive Complexity of 92 (exceeds 5 allowed). Consider refactoring. Open
function MetaTermsDirective(metadata, $filter, $timeout, preferencesService, desks) {
return {
scope: {
item: '=',
field: '@',
- 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 362 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {article} = this.props;
const {
flags,
Function AggregateCtrl
has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring. Open
export function AggregateCtrl($scope, desks, workspaces, preferencesService, storage,
savedSearch, content) {
const CONTENT_PROLFILE = gettext('Content profile');
var PREFERENCES_KEY = 'agg:view';
var defaultMaxItems = 10;
- 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 authoring-angular-integration.tsx
has 762 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable react/display-name */
/* eslint-disable react/no-multi-comp */
import {assertNever} from 'core/helpers/typescript-helpers';
import {DeskAndStage} from './subcomponents/desk-and-stage';
import {LockInfo} from './subcomponents/lock-info';
Function SearchParameters
has 353 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function SearchParameters($location, asset, tags, metadata, common, desks,
userList, ingestSources, subscribersService, $templateCache, search) {
return {
scope: {
repo: '=',
File generic-list-page.tsx
has 742 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable react/no-multi-comp */
/* eslint-disable brace-style */
import React from 'react';
import {noop} from 'lodash';
Function WidgetGroup
has a Cognitive Complexity of 86 (exceeds 5 allowed). Consider refactoring. Open
export function WidgetGroup(search, api, superdesk, desks, cards, $timeout, $q,
$location, $anchorScroll, activityService: IActivityService, $rootScope, datetime, metadata) {
const services = {
$anchorScroll: $anchorScroll,
$location: $location,
- 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 link
has 343 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function(scope, elem) {
const PARAMETERS = getParameters();
var ENTER = 13;
scope.dateFilters = getDateFilters()
Function render
has 342 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {templateFields, readOnly} = this.props;
const headline_template = this.props.templateFields.title_template ?? {
prefix: '',
Function WidgetGroup
has 341 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function WidgetGroup(search, api, superdesk, desks, cards, $timeout, $q,
$location, $anchorScroll, activityService: IActivityService, $rootScope, datetime, metadata) {
const services = {
$anchorScroll: $anchorScroll,
$location: $location,
File suggestions.tsx
has 730 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {EditorState, Modifier, RichUtils} from 'draft-js';
import {onChange} from './editor3';
import {acceptedInlineStyles, sanitizeContent} from '../helpers/inlineStyles';
import {
changeSuggestionsTypes, getStyleSuggestionsTypes,
File language-mapping-list.ts
has 730 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* jshint ignore:start */
// from github:mozilla/language-mapping-list
export default {
ach: {
nativeName: 'Lwo',
Function ArticleEditDirective
has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring. Open
export function ArticleEditDirective(
autosave,
metadata,
$filter,
superdesk,
- 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 TemplatesDirective
has a Cognitive Complexity of 83 (exceeds 5 allowed). Consider refactoring. 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();
- 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 328 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const state = this.state;
const {authoringStorage, fieldsAdapter, storageAdapter, getLanguage, getSidePanel} = this.props;
if (state.initialized !== true) {
Function TagService
has 327 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function TagService($location, desks, userList, metadata, search,
ingestSources, subscribersService, $q) {
const PARAMETERS = getParameters();
const EXCLUDE_FACETS = getExcludeFacets();
var tags: any = {};
File auto-tagging.tsx
has 697 lines of code (exceeds 250 allowed). Consider refactoring. Open
import * as React from 'react';
import {OrderedMap, OrderedSet, Map} from 'immutable';
import {Switch, Button, ButtonGroup, EmptyState, Autocomplete, Modal} from 'superdesk-ui-framework/react';
import {ToggleBoxNext} from 'superdesk-ui-framework';
import {showModal} from '@superdesk/common';
Function link
has 312 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function(scope, elem) {
var criteria;
scope.page = 1;
scope.fetching = false;