Showing 171 of 837 total issues
Function format
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
change, setProp, itemProp, newSetFormatter, addDeleteFormatter,
modifyFormatter
Function renderBasicInfo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
renderBasicInfo() {
const {user, editor} = this.props;
const {
cachedMetabrainzName,
metabrainzUserId,
- 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 _bulkIndexEntities
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export async function _bulkIndexEntities(entities) {
if (!entities.length) {
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 SortNameField
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function SortNameField({
empty,
error,
onChange,
storedNameValue,
- 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 CoverTab
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function CoverTab(props:CoverProps) {
const {publisherValue: publishers, onPublisherChange, identifierEditorVisible,
onClearPublisher, handleClearPublishers, modalIsOpen, ...rest} = props;
const publisherValue:EntitySelect[] = Object.values(convertMapToObject(publishers ?? {}));
const onChangeHandler = React.useCallback((value:EntitySelect[], 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 UnifiedForm
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function UnifiedForm(props:UnifiedFormProps) {
const {allIdentifierTypes, validator, onSubmit, formValid,
languageOptions, contentTabEmpty, coverTabValid, coverTabEmpty, detailTabValid, detailTabEmpty} = props;
const rest = omit(props, ['contentTabEmpty', 'coverTabValid', 'coverTabEmpty', 'detailTabValid', 'formValid', 'detailTabEmpty']);
React.useMemo(() => {
- 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 getNextAnnotation
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
orm, transacting, currentEntity, body, revision
Function handleDelete
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
orm: any, req: PassportRequest, res: $Response, HeaderModel: any,
RevisionModel: any
Function searchByName
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function searchByName(orm, name, type, size, from) {
Function processEntitySets
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
orm: any,
currentEntity: Record<string, unknown> | null | undefined,
entityType: EntityTypeString,
body: any,
transacting: Transaction
Function getOrderedRevisionsForEntityPage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export async function getOrderedRevisionsForEntityPage(orm: any, from: number, size: number, RevisionModel, bbid: string) {
Function generateEntityProps
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
entityType: string,
req: PassportRequest, res: $Response,
additionalProps: any,
initialStateCallback: (entity: any) => any = () => new Object()
Function _createNote
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function _createNote(orm, content, editorID, revision, transacting) {
Function handleCreateOrEditEntity
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
req: PassportRequest,
res: $Response,
entityType: EntityTypeString,
derivedProps: Record<string, unknown>,
isMergeOperation: boolean
Function searchOption
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export async function searchOption(orm, type:string, query:string, idKey = 'id', exactMatch = false):Promise<{
Function fetchOrCreateMainEntity
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
orm, transacting, isNew, bbid, entityType
Function generateRel
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function generateRel(workEntity, seriesEntity, attributeSetId?, isAdded = false, isRemoved = false) {
Function getValidOtherEntityTypes
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function getValidOtherEntityTypes(
relTypes: Array<RelationshipType>,
baseEntity: Entity
) {
let relationshipTypes = relTypes;
- 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 PublisherTableRow
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function PublisherTableRow({showAddedAtColumn, publisher, showCheckboxes, selectedEntities, onToggleRow}) {
const name = getEntityLabel(publisher);
const number = publisher.number || '?';
const disambiguation = getEntityDisambiguation(publisher);
const publisherType = publisher.publisherType ? publisher.publisherType.label : '?';
- 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() {
let reviewContent;
const mapEntityType = {
Author: 'author',
EditionGroup: 'edition-group',
- 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"