Showing 3,654 of 3,654 total issues
Function render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<WithAttachments item={this.props.item}>
{(allAttachments) => {
if (allAttachments.length === 0) {
Function replaceHighlight
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
const replaceHighlight = (state, txt, all = false) => {
const {index, pattern, caseSensitive, diff} = state.searchTerm;
const es = state.editorState;
let contentChanged = false;
Function component
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
component() {
let highlightsAndSuggestions = [];
let data;
if (this.styleBasedHighlightsExist()) {
Function addDeleteParagraphSuggestions
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
const addDeleteParagraphSuggestions = (editorState, data) => {
const selection = editorState.getSelection();
let newEditorState = editorState;
let content = editorState.getCurrentContent();
let block = content.getBlockForKey(selection.getStartKey());
Function onload
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
img.onload = function() {
if (!src || scope.showMinSizeError
&& !validateConstraints(scope.original, scope.rendition)) {
return;
}
Function getPublishToolbarWidget
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function getPublishToolbarWidget(
panelState: IStateInteractiveActionsPanelHOC,
panelActions: IActionsInteractiveActionsPanelHOC,
): ITopBarWidget<IArticle> {
const publishWidgetButton: ITopBarWidget<IArticle> = {
- 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 12 (exceeds 5 allowed). Consider refactoring. Open
render() {
const sourceManualEntry: IDropdownConfig['source'] = 'manual-entry';
const sourceVocabulary: IDropdownConfig['source'] = 'vocabulary';
const config = (() => {
- 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 getArticleAdapter
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function getArticleAdapter(): IAuthoringReactArticleAdapter {
const customFieldVocabularies = getCustomFieldVocabularies();
const oldFormatCustomFieldIds: Set<IOldCustomFieldId> = new Set(
customFieldVocabularies
- 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 getFieldsAdapter
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function getFieldsAdapter(authoringStorage: IAuthoringStorage<IArticle>): IFieldsAdapter<IArticle> {
const customFieldVocabularies = getCustomFieldVocabularies();
const adapter: IFieldsAdapter<IArticle> = getBaseFieldsAdapter();
for (const vocabulary of customFieldVocabularies) {
- 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 DeskeditPeople
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function DeskeditPeople(WizardHandler, desks, notify) {
return {
link: function(scope) {
scope.$watch('step.current', (step, previous) => {
if (step === 'people') {
- 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 IngestRoutingSchedule
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function IngestRoutingSchedule(tzdata) {
return {
scope: {
rule: '=', // the routing rule whose schedule is being edited
},
- 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 ItemLock
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function ItemLock(api, lock, privileges, desks) {
return {
templateUrl: 'scripts/apps/archive/views/item-lock.html',
scope: {item: '='},
link: function(scope) {
- 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 MetaPlaceDirective
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export default function MetaPlaceDirective(places: IPlacesService) {
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 getMultiActions
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function getMultiActions(
getSelectedItems: () => Array<IArticle>,
unselectAll: () => void,
) {
const $location = ng.get('$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 renderArea
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function renderArea(
area: 'firstLine' | 'secondLine' | 'singleLine' | 'priority',
itemProps: IItemProps,
props?: { className?: string },
customRender: any = {},
- 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 ItemPreview
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function ItemPreview(asset, storage, desks, _, familyService, privileges) {
/**
* @description Closes the preview panel if the currently previewed
* item is spiked / unspiked or moved.
* @param {Object} scope - angular scope
- 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 ItemSearchbar
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function ItemSearchbar($location, $document, asset) {
return {
scope: true,
templateUrl: asset.templateUrl('apps/search/views/item-searchbar.html'),
link: function(scope, elem) {
- 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 getBlockAndOffset
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export const getBlockAndOffset = (
editorState,
selection,
offset,
startFromEnd = false,
- 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 PrivilegesService
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function PrivilegesService($rootScope, preferencesService) {
var _privileges = {};
this.privileges = _privileges;
$rootScope.privileges = _privileges;
- 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 deleteCurrentSelection
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
const deleteCurrentSelection = (editorState, data, action = 'delete') => {
let selection = editorState.getSelection();
let newEditorState;
if (selection.isCollapsed()) {
- 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"