qlik-oss/picasso.js

View on GitHub
plugins/q/src/formatter/index.js

Summary

Maintainability
A
2 hrs
Test Coverage
A
100%

Showing 2 of 2 total issues

Function createFromMetaInfo has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

export function createFromMetaInfo(meta, localeInfo) {
if (meta && meta.qNumFormat && ['D', 'T', 'TS', 'IV'].indexOf(meta.qNumFormat.qType) !== -1) {
return timeFormat(meta.qNumFormat.qFmt, meta.qNumFormat.qType, localeInfo);
}
let pattern = '#';
Severity: Minor
Found in plugins/q/src/formatter/index.js - About 1 hr to fix

Consider simplifying this complex logical expression.
Open

if (meta && meta.qNumFormat) {
pattern = meta.qNumFormat.qFmt || pattern;
thousand = meta.qNumFormat.qThou || thousand;
decimal = meta.qNumFormat.qDec || decimal;
type = meta.qNumFormat.qType || type;
Severity: Major
Found in plugins/q/src/formatter/index.js - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status