qlik-oss/picasso.js

View on GitHub

Showing 554 of 2,268 total issues

File container.spec.js has 1702 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import Container, { create as createContainer } from '../container';
import { create as createRect } from '../rect';
import GeoRect from '../../../geometry/rect';
 
describe('Container', () => {

    File extractor-t.spec.js has 1168 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { extract, getFieldDepth } from '../extractor-t';
     
    import { getPropsInfo, collect, track } from '../../../../../packages/picasso.js/src/core/data/util';
     
    describe('q-data-extractor-t', () => {
    Severity: Major
    Found in plugins/q/src/data/__tests__/extractor-t.spec.js - About 3 days to fix

      File refline.spec.js has 1082 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import componentFactory from '../../../component/component-factory';
      import refLineComponent from '../refline';
       
      describe('reference lines', () => {
      let rendererOutput;

        File bars.spec.js has 993 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import {
        getBarRect,
        isTextInRect,
        placeSegmentInSegment,
        placeTextInRect,

          Function componentFactory has a Cognitive Complexity of 122 (exceeds 5 allowed). Consider refactoring.
          Open

          function componentFactory(definition, context = {}) {
          const { defaultSettings = {}, _DO_NOT_USE_getInfo = () => ({}) } = definition;
          const {
          chart,
          container,
          Severity: Minor
          Found in packages/picasso.js/src/core/component/component-factory.js - About 2 days to fix

          Function chartFn has 493 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function chartFn(definition, context) {
          /**
          * @typedef {object} ChartDefinition
          * @property {ChartDefinition~beforeDestroy} [beforeDestroy]
          * @property {ChartDefinition~beforeMount} [beforeMount]
          Severity: Major
          Found in packages/picasso.js/src/core/chart/index.js - About 2 days to fix

            Function createLineWithLabel has a Cognitive Complexity of 114 (exceeds 5 allowed). Consider refactoring.
            Open

            export function createLineWithLabel({ chart, blueprint, renderer, p, settings, items, slopeLine }) {
            let doesNotCollide = true;
            let line = false;
            let rect = false;
            let label = false;

            Function brush has a Cognitive Complexity of 112 (exceeds 5 allowed). Consider refactoring.
            Open

            export default function brush({ vc = valueCollection, rc = rangeCollection } = {}) {
            let activated = false;
            let ranges = {};
            let values = {};
            let aliases = {};
            Severity: Minor
            Found in packages/picasso.js/src/core/brush/brush.js - About 2 days to fix

            File extractor-s.spec.js has 918 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import extract, { getFieldAccessor } from '../extractor-s';
            import q from '../dataset';
             
            import { collect, track } from '../../../../../packages/picasso.js/src/core/data/util';
             
             
            Severity: Major
            Found in plugins/q/src/data/__tests__/extractor-s.spec.js - About 2 days to fix

              Function componentFactory has 448 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function componentFactory(definition, context = {}) {
              const { defaultSettings = {}, _DO_NOT_USE_getInfo = () => ({}) } = definition;
              const {
              chart,
              container,
              Severity: Major
              Found in packages/picasso.js/src/core/component/component-factory.js - About 2 days to fix

                Function doIt has a Cognitive Complexity of 108 (exceeds 5 allowed). Consider refactoring.
                Open

                function doIt({ propsArr, props, item, itemData, ret, sourceKey }) {
                for (let i = 0; i < propsArr.length; i++) {
                const pCfg = props[propsArr[i]];
                const arr = pCfg.fields || [pCfg];
                let coll;
                Severity: Minor
                Found in plugins/q/src/data/extractor-t.js - About 2 days to fix

                File brush.spec.js has 852 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import brush, { toggle, set } from '../brush';
                 
                describe('brush', () => {
                const noop = () => {};
                let sandbox;
                Severity: Major
                Found in packages/picasso.js/src/core/brush/__tests__/brush.spec.js - About 2 days to fix

                  Function extract has a Cognitive Complexity of 99 (exceeds 5 allowed). Consider refactoring.
                  Open

                  export default function extract(config, dataset, cache, util) {
                  const cfgs = Array.isArray(config) ? config : [config];
                  let dataItems = [];
                  for (let i = 0; i < cfgs.length; i++) {
                  if (typeof cfgs[i].field !== 'undefined') {
                  Severity: Minor
                  Found in plugins/q/src/data/extractor-s.js - About 1 day to fix

                  Function formatValue has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring.
                  Open

                  formatValue(value) {
                  let prep = this._prepared,
                  temp,
                  exponent,
                  abbr = '',
                  Severity: Minor
                  Found in plugins/q/src/formatter/parts/qs-number-formatter.js - About 1 day to fix

                  File dock-layout.spec.js has 762 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import dockLayout from '../docker';
                  import createRect from '../create-rect';
                  import dockConfig from '../config';
                   
                  describe('Dock Layout', () => {

                    File box.spec.js has 725 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    import componentFactoryFixture from '../../../../../test/helpers/component-factory-fixture';
                    import boxMarker from '../box';
                     
                    describe('box component', () => {
                    let rendererOutput;

                      Function chartFn has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function chartFn(definition, context) {
                      /**
                      * @typedef {object} ChartDefinition
                      * @property {ChartDefinition~beforeDestroy} [beforeDestroy]
                      * @property {ChartDefinition~beforeMount} [beforeMount]
                      Severity: Minor
                      Found in packages/picasso.js/src/core/chart/index.js - About 1 day to fix

                      File brush.js has 709 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      import extend from 'extend';
                       
                      import EventEmitter from '../utils/event-emitter';
                       
                      import rangeCollection from './range-collection';
                      Severity: Major
                      Found in packages/picasso.js/src/core/brush/brush.js - About 1 day to fix

                        File line.spec.js has 686 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        import GeoLine from '../line';
                         
                        describe('GeoLine', () => {
                        describe('constructor', () => {
                        it('should set correct default values when no arguments passed', () => {
                        Severity: Major
                        Found in packages/picasso.js/src/core/geometry/__tests__/line.spec.js - About 1 day to fix

                          File q-brush.spec.js has 657 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import qBrush, { extractFieldFromId } from '../q-brush';
                           
                          describe('q-brush', () => {
                          let brush;
                          let layout;
                          Severity: Major
                          Found in plugins/q/src/brush/__tests__/q-brush.spec.js - About 1 day to fix
                            Severity
                            Category
                            Status
                            Source
                            Language