Showing 1,922 of 3,654 total issues
Function AuthoringDirective
has a Cognitive Complexity of 210 (exceeds 5 allowed). Consider refactoring. Open
export function AuthoringDirective(
superdesk,
authoringWorkspace: AuthoringWorkspaceService,
notify,
desks,
- 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 AuthoringDirective
has 742 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function AuthoringDirective(
superdesk,
authoringWorkspace: AuthoringWorkspaceService,
notify,
desks,
Function link
has 738 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function($scope, elem, attrs) {
$scope.loading = false;
$scope.tabsPinned = false;
var _closing;
Function constructor
has 667 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor() {
this.lock = element(by.css('[ng-click="lock()"]'));
this.correct_button = element(by.buttonText('correct'));
this.kill_button = element(by.buttonText('kill'));
this.close_button = element(by.buttonText('Close'));
Function SearchService
has a Cognitive Complexity of 155 (exceeds 5 allowed). Consider refactoring. Open
export function SearchService($location, session, multi,
preferencesService, moment, sortService) {
const PARAMETERS = getParameters();
const EXCLUDE_FACETS = getExcludeFacets();
- 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 getInlineToolbarActions
has 630 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getInlineToolbarActions(
options: IExposedFromAuthoring<IArticle>,
action?: IAuthoringActionType,
): IAuthoringOptions<IArticle> {
const {
File authoring-react.tsx
has 1195 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import {
IArticle,
IAuthoringFieldV2,
IContentProfileV2,
File metadata.ts
has 1148 lines of code (exceeds 250 allowed). Consider refactoring. Open
import _ from 'lodash';
import PreferedCvItemsConfigDirective from './PreferedCvItemsConfigDirective';
import MetaPlaceDirective from './MetaPlaceDirective';
import {getVocabularySelectionTypes} from '../../vocabularies/constants';
import {gettext} from 'core/utils';
Function getAutoTaggingComponent
has 572 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function getAutoTaggingComponent(superdesk: ISuperdesk, label: string) {
const {preferences} = superdesk;
const {httpRequestJsonLocal} = superdesk;
const {gettext, gettextPlural} = superdesk.localization;
const {memoize, generatePatch, arrayToTree} = superdesk.utilities;
Function MonitoringGroup
has a Cognitive Complexity of 139 (exceeds 5 allowed). Consider refactoring. Open
export function MonitoringGroup(
cards,
api,
authoringWorkspace: AuthoringWorkspaceService,
$timeout,
- 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 AuthoringService
has 557 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function AuthoringService(
$q,
$location,
api,
lock,
Function constructor
has 544 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor() {
this.config = element(by.className('aggregate-settings'));
this.label = element(by.model('widget.configuration.label'));
this.openMonitoring = function() {
Function IngestSourcesContent
has 520 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function IngestSourcesContent(ingestSources, api, $location,
modal, $filter, privileges) {
return {
templateUrl: 'scripts/apps/ingest/views/settings/ingest-sources-content.html',
link: function($scope) {
Function link
has 515 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function($scope) {
$scope.waitForDirectiveReady = function() {
return Promise.all([
ingestSources.fetchAllFeedingServicesAllowed(),
]);
File ui.ts
has 999 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable max-len */
/* tslint:disable:max-line-length */
import _, {difference, filter, mapValues, sortBy, union, without} from 'lodash';
import moment from 'moment-timezone';
File monitoring_spec.ts
has 997 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable newline-per-chained-call */
import {element, browser, by, protractor, ElementFinder} from 'protractor';
import {monitoring} from './helpers/monitoring';
Function SearchService
has 498 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function SearchService($location, session, multi,
preferencesService, moment, sortService) {
const PARAMETERS = getParameters();
const EXCLUDE_FACETS = getExcludeFacets();
Function MonitoringGroup
has 483 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function MonitoringGroup(
cards,
api,
authoringWorkspace: AuthoringWorkspaceService,
$timeout,
Function render
has 473 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {historyItems} = this.state;
if (historyItems == null) {
return null;
Function AuthoringService
has a Cognitive Complexity of 115 (exceeds 5 allowed). Consider refactoring. Open
export function AuthoringService(
$q,
$location,
api,
lock,
- 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"