qlik-oss/picasso.js

View on GitHub
plugins/q/src/data/util.js

Summary

Maintainability
B
4 hrs
Test Coverage
A
100%

Showing 3 of 3 total issues

Function findField has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

export function findField(query, { cache }) {
if (typeof query === 'number') {
return cache.fields[query];
}
 
 
Severity: Minor
Found in plugins/q/src/data/util.js - About 1 hr to fix

Function flattenTree has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

function flattenTree(children, steps, arrIndexAtTargetDepth) {
let arr = [];
if (!children || !children.length) {
return arr;
}
Severity: Minor
Found in plugins/q/src/data/util.js - About 1 hr to fix

Avoid too many return statements within this function.
Open

return query;
Severity: Major
Found in plugins/q/src/data/util.js - About 30 mins to fix

    There are no issues that match your filters.

    Category
    Status