Showing 3,654 of 3,654 total issues
Function ContentProfilesController
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function ContentProfilesController($scope: IScope, $location, notify, content, modal, $q) {
var self = this;
// info bubble
$scope.showInfoBubble = true;
- 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 SubscribersDirective
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function SubscribersDirective(
notify, api, subscribersService, adminPublishSettingsService,
modal, contentFilters, $q, $filter, products, $rootScope,
) {
return {
- 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 getPlaceAdapter
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function getPlaceAdapter(): IFieldAdapter<IArticle> {
const useGeoNamesApi = sdApi.config.featureEnabled('places_autocomplete');
if (useGeoNamesApi) {
return {
- 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 componentDidMount
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
componentDidMount() {
document.addEventListener('keydown', this.handleKeydown);
document.addEventListener('click', this.handleClickOutside);
if (this.dom.root) {
- 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 UserSelectList
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function UserSelectList($filter, api) {
return {
scope: {
exclude: '=?',
onchoose: '&',
- 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 ContactList
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function ContactList(
$timeout,
$filter,
search,
datetime,
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
render() {
if (this.state.loading) {
return 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 PopulateAuthorsController
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function PopulateAuthorsController($scope: IScope, roles: IRolesService, session: ISession) {
if (!$scope._editable) {
return;
}
- 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 LockService
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function LockService($q, api, session, privileges, notify) {
/**
* Lock an item
*/
this.lock = function lock(item, force, action) {
- 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 WorkqueueCtrl
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function WorkqueueCtrl(
$scope,
$rootScope,
$route,
workqueue: WorkqueueService,
- 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 getSortedFields
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export const getSortedFields = (
section: 'header' | 'content',
editor: any,
item: IArticle,
hideMedia: 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 getSortedFieldsFiltered
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export const getSortedFieldsFiltered = (
section: 'header' | 'content',
editor: any,
item: IArticle,
hideMedia: 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 VersioningController
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function VersioningController($scope, authoring, desks, archiveService) {
$scope.last = null;
$scope.versions = null;
$scope.selected = null;
$scope.users = 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 SearchTags
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function SearchTags($location, tags, asset, metadata, desks, $rootScope) {
return {
scope: {
urlParams: '=',
},
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
render() {
const {items, tabs, onClose, onError, onDataChange} = this.props;
const {activeTab} = this.state;
const markupV2 = authoringReactViewEnabled && this.props.markupV2 === true;
const handleUnsavedChanges = this.props.handleUnsavedChanges ?? handleUnsavedChangesDefault;
- 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 getItemsToLoad
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function getItemsToLoad<T>(
loadedItems: Map<number, T>,
totalItemsCount: number,
viewportIndexStart: number,
viewportIndexEnd: number,
- 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 componentDidMount
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
componentDidMount() {
document.addEventListener('keydown', this.handleKeydown);
document.addEventListener('click', this.handleClickOutside);
if (this.dom.root) {
- 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 replaceAllForEachBlock
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export function replaceAllForEachBlock(
contentState: ContentState,
regex: RegExp, // a global regex must be passed
replaceWith: string,
): ContentState {
- 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 onSubmit
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
onSubmit(linkType) {
let link;
const {suggestingMode, localDomains} = this.props;
const _createLinkSuggestion = this.props.createLinkSuggestion;
const _applyLink = this.props.applyLink;
- 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 allowEditSuggestion
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const allowEditSuggestion = (editorState, author, isBackward) => {
const selection = editorState.getSelection();
let newEditorState;
let tmpEditorState;
- 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"