Showing 3,654 of 3,654 total issues
Function getRundownItemAuthoringStorage
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function getRundownItemAuthoringStorage(id: IRundownItem['_id']): IAuthoringStorage<IRundownItem> {
class AutoSaveRundownItem implements IAuthoringAutoSave<IRundownItem> {
get() {
return httpRequestJsonLocal<IRundownItem>({
method: 'GET',
- 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 getPartialDateFormat
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function getPartialDateFormat(parts: {year?: boolean; month?: boolean; day?: boolean}): string {
const separator = superdesk.instance.config.view.dateformat
.replace('YYYY', '')
.replace('MM', '')
.replace('DD', '')[0];
- 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 prepareForDropping
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const prepareForDropping = (
event: React.DragEvent<HTMLDivElement>,
image: IImage | null,
) => {
if (image == 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 handleSave
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
handleSave() {
const {gettext} = this.props.superdesk.localization;
const {session, instance} = this.props.superdesk;
const host = instance.config.server.url;
- 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 handleSave
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
handleSave() {
const {dataApi} = this.props.superdesk;
const {gettext} = this.props.superdesk.localization;
const {x, y, width, height} = this.state.transformations.crop;
const crop = this.getCropRotate({x: x, y: y, width: width, height: height});
- 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 SortPackageItems
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function SortPackageItems() {
return {
link: function(scope, element) {
var updated = 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 render
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
render() {
if (this.state.actions == null) {
return (
<MoreActionsButton
aria-label={gettext('Actions menu')}
- 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 getVocabularyItems
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
getVocabularyItems(vocabularyId): Array<IVocabularyItem> {
const vocabulary = sdApi.vocabularies.getAll().get(vocabularyId);
if (vocabularyId === ANPA_CATEGORY.vocabularyId) {
return vocabulary.items;
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
render() {
if (this.state.macros == null) {
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 Toggle
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const Toggle: React.StatelessComponent<any> = ({value, onChange, readOnly, className}) => {
const onClick = () => onChange({target: {value: !value}});
const handleKeyDown = (event) => {
if (event) {
switch (event.keyCode) {
- 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 constructor
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
constructor(props: IProps) {
super(props);
const {svc, contact} = props;
const {metadata} = svc;
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
render() {
const {user} = this.props;
if (user == null) {
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 MacrosReplaceDirective
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function MacrosReplaceDirective(editorResolver) {
return {
scope: true,
templateUrl: 'scripts/apps/authoring/macros/views/macros-replace.html',
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 DictionaryConfigController
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function DictionaryConfigController($scope, dictionaries, session, modal, notify) {
$scope.dictionaries = null;
$scope.origDictionary = null;
$scope.dictionary = 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 AssignmentIcon
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function AssignmentIcon() {
return {
templateUrl: 'scripts/apps/archive/views/assignment-icon.html',
scope: {item: '='},
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 MetaIngest
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function MetaIngest(ingestSources) {
return {
scope: {
item: '=',
},
- 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 UserMentionDirective
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function UserMentionDirective(userList, desks, asset, $q) {
return {
templateUrl: asset.templateUrl('apps/users/views/mentions.html'),
link: function(scope, elem) {
scope.users = [];
- 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 PlacesServiceFactory
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export default function PlacesServiceFactory(api, features, metadata) {
const geoNameToCity = (data: IGeoName): ILocated => ({
dateline: 'city',
country_code: data.country_code,
tz: data.tz,
- 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 edit
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
edit(
scope,
item,
options: {isNew?: boolean, customRel?: string, defaultTab?: any, showMetadata?: boolean} = {},
callback = 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 MetaTargetedPublishingDirective
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function MetaTargetedPublishingDirective() {
return {
scope: {
list: '=',
disabled: '=ngDisabled',
- 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"