TargetProcess/tauCharts

View on GitHub

Showing 269 of 3,565 total issues

Function init has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    init(xConfig) {

        const config = xConfig;

        config.guide = utils.defaults(
Severity: Minor
Found in src/elements/element.path.base.js - About 1 hr to fix

    Function fixScale has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            const fixScale = (scale: ScaleFunction, start, end, flip) => {
    
                var domain = scale.domain();
                var length = Math.abs(scale.value(domain[1]) - scale.value(domain[0]));
                var koeff = ((domain[1] - domain[0]) / length);
    Severity: Minor
    Found in src/grammar-registry.ts - About 1 hr to fix

      Function grid has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  .call((selection) => {
      
                      var grid = selection;
      
                      var animationSpeed = this.config.guide.animationSpeed;
      Severity: Minor
      Found in src/elements/coords.cartesian.js - About 1 hr to fix

        Function constructor has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            constructor(xSource: DataFrame, scaleConfig: ScaleConfig) {
        
                super(xSource, scaleConfig);
        
                var discrete = (scaleConfig.dimType !== 'measure');
        Severity: Minor
        Found in src/scales/color.ts - About 1 hr to fix

          Function constructor has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              constructor(
                  config: GPLSpec,
                  scalesRegistryInstance: ScalesFactory,
                  unitsRegistry: UnitsRegistry,
                  grammarRules: GrammarRegistry
          Severity: Minor
          Found in src/charts/tau.gpl.ts - About 1 hr to fix

            Function subscribe has 32 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                subscribe(sel: GrammarElement, dataInterceptor = ((x: any) => x), eventInterceptor = ((x: Event) => x)) {
                    var self = this;
                    var last = {};
                    ([
                        {
            Severity: Minor
            Found in src/elements/element.ts - About 1 hr to fix

              Function createIterations has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          const createIterations = (forward) => {
                              const iterations = groups
                                  .map((g, i) => {
                                      return {
                                          elements: g.elements,
              Severity: Minor
              Found in src/utils/utils-dom.ts - About 1 hr to fix

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

                    create(interval) {
                
                        var varSet = this.vars;
                        var utcTime = this.scaleConfig.utcTime;
                        const period = this.periodGenerator;
                Severity: Minor
                Found in src/scales/time.ts - About 1 hr 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 getTimeTicks has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                function getTimeTicks(domain: Date[], utc: boolean, count = 10) {
                
                    const d0 = Number(domain[0]);
                    const d1 = Number(domain[1]);
                
                
                Severity: Minor
                Found in src/scales/time.ts - About 1 hr 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 niceZeroBased has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                    export function niceZeroBased(domain: number[]) {
                
                        var m = 10;
                
                        var low = parseFloat(Math.min(...domain).toFixed(15));
                Severity: Minor
                Found in src/utils/utils.ts - About 1 hr 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 extendLogScale has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                function extendLogScale(scale) {
                    var d3ScaleCopy = scale.copy;
                
                    // NOTE: D3 log scale ticks count is not configurable
                    // and returns 10 ticks per each exponent.
                Severity: Minor
                Found in src/scales/logarithmic.ts - About 1 hr 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 ChartArea has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                const ChartArea = (rawConfig: ChartConfig) => {
                
                    var config = normalizeConfig(rawConfig);
                
                    var data = config.data;
                Severity: Minor
                Found in src/api/chart-area.ts - About 1 hr 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 _initPointerEvents has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                    _initPointerEvents() {
                        if (!this._liveSpec.settings.syncPointerEvents) {
                            this._pointerAnimationFrameId = null;
                        }
                        const svg = d3.select(this._svg);
                Severity: Minor
                Found in src/charts/tau.plot.ts - About 1 hr 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 _loopTasks has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                    _loopTasks() {
                
                        var task: Task;
                        var duration: number;
                        var frameDuration = 0;
                Severity: Minor
                Found in src/charts/task-runner.ts - About 1 hr 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 getDataSetId has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        const getDataSetId = (() => {
                            const current = (frameSelection.empty() ? [] : frameSelection.data());
                            const currentIds = new Map();
                            frameSelection.each(function (d) {
                                currentIds.set(d, Number(this.getAttribute('data-id')));
                Severity: Minor
                Found in src/elements/element.path.base.js - About 1 hr to fix

                  Function baseModel has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      baseModel(screenModel) {
                  
                          const kRound = 10000;
                          var baseModel = {
                              gog: screenModel.model,
                  Severity: Minor
                  Found in src/elements/element.path.base.js - About 1 hr to fix

                    Function updateFrame has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            var updateFrame = function (selection) {
                                var backgroundPath = selection
                                    .selectAll('.background')
                                    .data(f => f.part());
                                backgroundPath
                    Severity: Minor
                    Found in src/elements/element.parallel.line.js - About 1 hr to fix

                      Function init has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          init(xConfig) {
                      
                              const config = BasePath.init(xConfig);
                              const enableStack = config.stack;
                      
                      
                      Severity: Minor
                      Found in src/elements/element.area.ts - About 1 hr to fix

                        Function _expandUnitsStructure has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            _expandUnitsStructure(root: Unit, parentPipe: DataFilter[] = []) {
                        
                                var self = this;
                        
                                if (root.expression.operator === false) {
                        Severity: Minor
                        Found in src/charts/tau.gpl.ts - About 1 hr to fix

                          Function getClosestElement has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              getClosestElement(cursorX, cursorY) {
                                  if (!this._boundsInfo) {
                                      return null;
                                  }
                                  const {bounds, tree} = this._boundsInfo;
                          Severity: Minor
                          Found in src/elements/element.path.base.js - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language