Showing 69 of 153 total issues
Function allValues
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public allValues(value: T): T[] {
const node = this.nodes.get(value);
if (!node) {
return [value];
}
- 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 registeredClasses
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private registeredClasses(fields: Id[], topology: Id): Id[] {
const classes = [rdfs.Resource.value];
for (const field of fields) {
if (typeof this.registrations[field] === "undefined") {
- 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 linkMiddleware
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const linkMiddleware = <T, API extends LinkedDataAPI = DataProcessor>(catchActions = true):
MiddlewareFn<T, API> => (lrs: LinkedRenderStore<T, API>): MiddlewareWithBoundLRS =>
(next: MiddlewareActionHandler): MiddlewareActionHandler =>
(action: SomeNode, args: any): Promise<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 processObject
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function processObject(subject: Node,
predicate: NamedNode,
datum: DataObject | SerializableDataTypes | null | undefined,
store: RDFAdapter,
ns?: NamespaceMap): NamedBlobTuple[] {
Function checkRegistration
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
r: ComponentRegistration<T>,
c: T,
t: SomeNode,
p: NamedNode,
top: SomeNode,
Function processResourceQueue
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private async processResourceQueue(): Promise<void> {
this.resourceQueueHandle = undefined;
const queue = this.resourceQueue;
this.resourceQueue = [];
- 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 digDeeper
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public digDeeper(subject: Node | undefined, path: Array<NamedNode | NamedNode[]>): [Quadruple[], SomeNode[]] {
if (path.length === 0 || typeof subject === "undefined") {
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 findSubject
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public findSubject(subject: Node | undefined, path: NamedNode[], match: Term | Term[]): Node[] {
if (path.length === 0 || typeof subject === "undefined") {
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 registerRenderer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static registerRenderer<T>(
component: T,
types: Id[],
fields: Id[],
topologies: Id[],
- 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 getEntity
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public async getEntity(iri: NamedNode, opts?: APIFetchOpts): Promise<Quadruple[]> {
const url = new URL(iri.value);
url.hash = "";
const requestIRI = rdfFactory.namedNode(url.toString());
const existing = this.requestMap.get(requestIRI.id);
- 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 deleteFieldMatching
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public deleteFieldMatching(recordId: Id, field: FieldId, value: SomeTerm): void {
const current = this.getField(recordId, field);
if (current === undefined) {
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
Avoid too many return
statements within this function. Open
return ext;
Avoid too many return
statements within this function. Open
return F_RDF_XML;
Avoid too many return
statements within this function. Open
return null;
Avoid too many return
statements within this function. Open
return rdfFactory.namedNode(prop.slice(1, -1));
Avoid too many return
statements within this function. Open
return constructor && constructor(matches[CI_MATCH_SUFFIX]);
Avoid too many return
statements within this function. Open
return 0;
Avoid too many return
statements within this function. Open
return F_JSONLD;
Avoid too many return
statements within this function. Open
return this.currentBroadcast = new ProcessBroadcast({
bulkSubscriptions: this.bulkSubscriptions.slice(),
changedSubjects: subjects,
subjectSubscriptions: Array.from(subjectRegs),
timeout: maxTimeout,
Avoid too many return
statements within this function. Open
return rdfFactory.namedNode(prop);