Showing 3,654 of 3,654 total issues
Function Export
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
export function Export(api, multi, notify, storage, session, urls) {
Function open
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
open(item) {
var _open = (_item) => {
var actions = this.authoring.itemActions(_item);
if (actions.edit) {
- 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 MetadataService
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
export function MetadataService(api, subscribersService, vocabularies, $rootScope, session, $filter) {
Function MultieditArticleDirective
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function MultieditArticleDirective(authoring, content, multiEdit, lock, $timeout, notify) {
Avoid deeply nested control flow statements. Open
if (isLockedInCurrentSession(article)) {
/**
* using article doesn't work because it is missing properties
* (at least slugline)
*/
Function TransmissionDetailsDirective
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function TransmissionDetailsDirective(api) {
return {
templateUrl: 'scripts/apps/authoring/versioning/history/views/publish_queue.html',
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 TranslationService
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
api,
$rootScope,
notify,
authoringWorkspace: AuthoringWorkspaceService,
desks,
Function MediaInfo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const MediaInfo: React.StatelessComponent<IProps> = (props) => {
const datetime = ng.get('datetime');
const item = props.item;
const meta = [];
- 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 6 arguments (exceeds 4 allowed). Consider refactoring. Open
export function ItemPreview(asset, storage, desks, _, familyService, privileges) {
Function SearchTags
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
export function SearchTags($location, tags, asset, metadata, desks, $rootScope) {
Function MultiActionBar
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
asset,
multi,
superdesk,
keyboardManager,
api,
Function SearchService
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
export function SearchService($location, session, multi,
preferencesService, moment, sortService) {
Function MultiImageEditController
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$scope: IScope,
modal,
notify,
lock,
session,
Function ItemContainer
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function ItemContainer(desks) {
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 IconMix
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const IconMix: React.StatelessComponent<any> = ({icon, subIcon, big, doubleSize, className, tooltip, color}) => {
let iconElement;
if (subIcon) {
if (big) {
- 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 showPopup
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
referenceElement: HTMLElement,
placement: Placement,
Component: React.ComponentType<{closePopup(): void}>,
zIndex?: number,
closeOnHoverEnd?: boolean,
Function fetchChangedResources
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
resource: string,
changes: Array<IResourceChange>,
currentItems: Array<T>,
refreshAllOnFieldsChange: Set<string> = new Set(),
abortSignal?: AbortSignal,
Function getHighlightStyleAtOffset
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
editorState, types, selection, offset, fromEnd = false, firstFound = true): string | Array<string> {
Function updateText
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
editorState: EditorState,
contentState: ContentState,
block: ContentBlock,
newText: string,
diffMatchPatch,
Function replaceText
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
editorState: EditorState,
content: ContentState,
block: ContentBlock,
offset: number,
text: string,