Showing 161 of 406 total issues
Function createQueryFacetCount
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
createQueryFacetCount: function(concept, facetVar, countFacetVar, isInverse, sampleSize) {
Function initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
initialize: function(variableName, generator, stepId, parent, root) {
Function initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
initialize: function(path, node, distinctValueCount, tags, doc) {
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));
}
- 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 getConstrainedSteps
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
getConstrainedSteps: function(path) {
// console.log("getConstrainedSteps: ", path);
// checkNotNull(path);
var tmp = [];
- 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 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);
- 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 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;
- 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 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) {
- 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 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();
- 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 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()) {
- 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 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;
- 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 copySubstitute
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
copySubstitute: function(expr, binding) {
var fn = function(node) {
var result = null;
- 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 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');
}
- 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 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');
}
- 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 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() {
- 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 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();
- 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 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) {
- 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 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();
- 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 _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];
- 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 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.
- 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"