GeoKnow/Jassa-Core

View on GitHub

Showing 161 of 406 total issues

Function createQueryFacetCount has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

        createQueryFacetCount: function(concept, facetVar, countFacetVar, isInverse, sampleSize) {
Severity: Minor
Found in trash/to-port/facete/QueryUtils.js - About 35 mins to fix

    Function initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            initialize: function(variableName, generator, stepId, parent, root) {
    Severity: Minor
    Found in trash/to-port/facete/VarNode.js - About 35 mins to fix

      Function initialize has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              initialize: function(path, node, distinctValueCount, tags, doc) {
      Severity: Minor
      Found in trash/to-port/facete/trash/FacetItem.js - About 35 mins to fix

        Function createFromTalisRdfJson has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            createFromTalisRdfJson: function(talisJson) {
                if (!talisJson || typeof(talisJson.type) === 'undefined') {
                    throw new Error('Invalid node: ' + JSON.stringify(talisJson));
                }
        
        
        Severity: Minor
        Found in lib/rdf/NodeFactory.js - About 35 mins to fix

        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 getConstrainedSteps has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            getConstrainedSteps: function(path) {
                    // console.log("getConstrainedSteps: ", path);
                // checkNotNull(path);
        
                var tmp = [];
        Severity: Minor
        Found in lib/facete/ConstraintManager.js - About 35 mins to fix

        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 getItem has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

        Cache.prototype.getItem = function(key) {
        
          // retrieve the item from the cache
          var item = this.storage_.get(key);
        
        
        Severity: Minor
        Found in lib/ext/monsur-jscache.js - About 35 mins to fix

        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 getNsURIPrefix has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            getNsURIPrefix: function(uri) {
                var result = null;
                var bestNs = null;
        
                // TODO: forEach can't be used in case a simple dictionary/map is used;
        Severity: Minor
        Found in lib/rdf/PrefixMappingImpl.js - About 35 mins to fix

        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 all has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            all: function(promises) {
                var r = Promise.all(promises)
                    .cancellable()
                    ['catch'](Promise.CancellationError, function(e) {
                        promises.forEach(function(promise) {
        Severity: Minor
        Found in lib/util/PromiseUtils.js - About 35 mins to fix

        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 createStepRelationsProperties has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            createStepRelationsProperties: function(facetConfig, pathHead, properties, isNegated) {
                var result = [];
        
                var path = pathHead.getPath();
                var isInverse = pathHead.isInverse();
        Severity: Minor
        Found in lib/facete/FacetUtils.js - About 35 mins to fix

        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 getValue has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            getValue: function(node) {
                var result;
                if(node == null) {
                    result = null;
                } else if(node.isUri()) {
        Severity: Minor
        Found in lib/rdf/NodeUtils.js - About 35 mins to fix

        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 createConcept has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            createConcept: function(filter) {
                var result;
        
                if(filter == null || filter.searchString == null || filter.searchString.trim() === '') {
                    result = null;
        Severity: Minor
        Found in lib/service/list_service/ListServiceTransformConceptMode.js - About 35 mins to fix

        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 copySubstitute has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            copySubstitute: function(expr, binding) {
                var fn = function(node) {
        
                    var result = null;
        
        
        Severity: Minor
        Found in lib/sparql/ExprUtils.js - About 35 mins to fix

        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 addMap has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            addMap: function(spec) {
                var name = spec.name;
                if(!name) {
                    throw new Error('Sponate spec must have a name');
                }
        Severity: Minor
        Found in lib/sponate/facade/StoreFacade.js - About 35 mins to fix

        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 parseRdfTerm has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            parseRdfTerm: function(str) { // , prefixes) {
                if (!str) {
                    throw new Error('[ERROR] Null Pointer Exception');
                }
        
        
        Severity: Minor
        Found in lib/rdf/NodeFactory.js - About 35 mins to fix

        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 createDeferred has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            createDeferred: function(isCancellable) {
                var _resolve;
                var _reject;
        
                var promise = new Promise(function() {
        Severity: Minor
        Found in lib/util/PromiseUtils.js - About 35 mins to fix

        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 createQueryExecution has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

            createQueryExecution: function(query) {
        
                var orderBy = query.getOrderBy();
                var limit = query.getLimit();
                var offset = query.getOffset();
        Severity: Minor
        Found in lib/service/sparql_service/SparqlServiceVirtFix.js - About 25 mins to fix

        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 opify has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

            opify: function(exprs, fnCtor) {
                var open = exprs;
                var next = [];
        
                while (open.length > 1) {
        Severity: Minor
        Found in lib/sparql/ExprUtils.js - About 25 mins to fix

        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 createRelationFacets has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

            createRelationFacets: function(facetConfig, pathHead, singleProperty) {
        
                var path = pathHead.getPath();
                var isInverse = pathHead.isInverse();
        
        
        Severity: Minor
        Found in lib/facete/FacetUtils.js - About 25 mins to fix

        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 _indexOfKey has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

            _indexOfKey: function(bucket, key) {
                if (bucket != null) {
        
                    for (var i = 0; i < bucket.length; ++i) {
                        var entry = bucket[i];
        Severity: Minor
        Found in lib/util/collection/HashMap.js - About 25 mins to fix

        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 stringify has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

        var stringify = function(value, replacer, space) {
        
            // The stringify method takes a value and an optional replacer, and an optional
            // space parameter, and returns a JSON text. The replacer can be a function
            // that can replace values, or an array of strings that will select the keys.
        Severity: Minor
        Found in lib/ext/JSONCanonical.js - About 25 mins to fix

        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

        Severity
        Category
        Status
        Source
        Language