Showing 52 of 207 total issues
File engine-minimal.js
has 1061 lines of code (exceeds 250 allowed). Consider refactoring. Open
const df_419_2 = new (require('@comunica/logger-void').LoggerVoid)();
const https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_init__2_0_0_components_ActorInit_jsonld_ActorInit_default_bus = new (require('@comunica/core').Bus)({
'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-init/^2.0.0/components/ActorInit.jsonld#ActorInit_default_bus'
});
const https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_context_preprocess__2_0_0_components_ActorContextPreprocess_jsonld_ActorContextPreprocess_default_bus = new (require('@comunica/core').Bus)({
File engine-default.js
has 1061 lines of code (exceeds 250 allowed). Consider refactoring. Open
const df_419_2 = new (require('@comunica/logger-void').LoggerVoid)();
const https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_init__2_0_0_components_ActorInit_jsonld_ActorInit_default_bus = new (require('@comunica/core').Bus)({
'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-init/^2.0.0/components/ActorInit.jsonld#ActorInit_default_bus'
});
const https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_context_preprocess__2_0_0_components_ActorContextPreprocess_jsonld_ActorContextPreprocess_default_bus = new (require('@comunica/core').Bus)({
File SPARQLGenerator.ts
has 553 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
ArrayTypeDescriptor,
DataSerializerUtils,
FilterQuery,
MapTypeDescriptor,
Function generateComponent
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
protected generateComponent(
key: string,
query: any,
dataType: Serializable<any>,
subject: Quad_Subject = DataFactory.variable('subject'),
- 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 generateComponent
has 173 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected generateComponent(
key: string,
query: any,
dataType: Serializable<any>,
subject: Quad_Subject = DataFactory.variable('subject'),
File InternalRDFDeserializer.ts
has 438 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
ArrayTypeDescriptor,
DataSerializerUtils,
Deserializer,
DeserializerFn,
Function bundle
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
const bundle = (env, module, entry = 'index', suffix = '') => {
const filename = `${PROJECT_NAME}${suffix}${module ? ".es" : ""}${env.prod ? ".min" : ""}`;
return {
name: PROJECT_NAME,
entry: `./dist/esm5/${entry}.js`,
- 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 deserializeObject
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
deserializeObject<T>(
sourceObject: Thing,
typeDescriptor: TypeDescriptor,
knownTypes: Map<string, Serializable<any>>,
_: string,
Function serializeObject
has 106 lines of code (exceeds 25 allowed). Consider refactoring. Open
serializeObject<T, TD extends TypeDescriptor>(
sourceObject: T,
typeDescriptor: TD,
_: string,
serializer: Serializer,
File InternalRDFSerializer.ts
has 304 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
ArrayTypeDescriptor,
MapTypeDescriptor,
ObjectMemberMetadata,
ObjectMetadata,
Function serializeObject
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
serializeObject<T, TD extends TypeDescriptor>(
sourceObject: T,
typeDescriptor: TD,
_: string,
serializer: Serializer,
- 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 bundle
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
const bundle = (env, module, entry = 'index', suffix = '') => {
const filename = `${PROJECT_NAME}${suffix}${module ? ".es" : ""}${env.prod ? ".min" : ""}`;
return {
name: PROJECT_NAME,
entry: `./dist/esm5/${entry}.js`,
Function createConstruct
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected createConstruct(query: FilterQuery): ConstructQuery {
const patterns = this.createQuery(query);
// Variables
const subjectVar = DataFactory.variable('subject');
const propVar = DataFactory.variable('prop');
Function deserializer
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
deserializer: (object: any) => {
if (!object) {
return 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 rdfTypeResolver
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
rdfTypeResolver(
sourceObject: IndexedObject,
knownTypes: Map<string, Serializable<any>>,
knownRDFTypes: Map<IriString, string[]>,
): Serializable<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 main
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
function main() {
console.log(chalk.redBright('OpenHPS RDF Generator'));
if (args['c']) {
const configPath = path.normalize(args['c']);
Function rdfTypeResolver
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
rdfTypeResolver(
sourceObject: IndexedObject,
knownTypes: Map<string, Serializable<any>>,
knownRDFTypes: Map<IriString, string[]>,
): Serializable<any> {
Function add
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
add(
predicate: IriString,
object: Quad_Object | Thing | number | string | IriString | object,
languageOrDatatype?: string | IriString,
): RDFBuilder {
- 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 convertSingleValue
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
convertSingleValue(
sourceObject: any,
typeDescriptor: TypeDescriptor,
memberName: string,
memberOptions?: ObjectMemberMetadata,
Function convertSingleValue
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
convertSingleValue(
sourceObject: any,
typeDescriptor: TypeDescriptor,
memberName: string,
memberOptions?: ObjectMemberMetadata,
- 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"