SiLeBAT/FSK-Lab

View on GitHub

Showing 6,856 of 14,752 total issues

Avoid deeply nested control flow statements.
Open

                else if ( col.field == 'executionTime' ) {
                    data = O._executionTimes[identifier]? O._executionTimes[identifier] :"";
                }
                else if ( col.field == 'uploadDate' ) {
                    data = O._uploadDates[identifier]? O._uploadDates[identifier] :"";
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.table.mt.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

                    if(modelMetadata['generalInformation']['modelCategory']){
                        data = modelMetadata['generalInformation']['modelCategory']['modelClass'] ?
                        modelMetadata['generalInformation']['modelCategory']['modelClass'] : "Generic model";                        
                    }
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.table.mt.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

              for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

                        if ( param.unit && param.unit != '[]' && param.unit != 'Others' ) {
                            let $append = $( '<div class="input-group-text"></div>' )
                                .text( param.unit )
                                .insertAfter( $inputControl )
                                .wrap( '<div class="input-group-append"></div>' )
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.simulation.js - About 45 mins to fix

Function _updateFilter has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    async _updateFilter() {
        let O = this;
        _log( 'TABLE MAIN / _updateFilter' );

        O._filtered = []; // stores all hidden/filtered rows
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.table.mt.js - About 45 mins 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

Avoid deeply nested control flow statements.
Open

      if (cut$1) {
        display.view = display.view.slice(0, cut$1.index);
        display.viewTo = cut$1.lineN;
      } else {
        resetView(cm);
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

        if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\d+)$/)) {
          if (indexOf(newGroup, Number(m[1])) > -1) {
            lst(newChanges)[prop] = change[prop];
            delete change[prop];
          }
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

                        if ( param.dataType.toLowerCase() === 'double' ) {
                            let decimals = param.value.substring(param.value.indexOf('.') + 1).length;
                            for ( let j = 0; j < decimals; j++ ) {
                                step = step / 10;
                            }
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.simulation.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

          } else if (sp.from > pos && nextChange > sp.from) {
            nextChange = sp.from;
          }
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

                    if ( field.param.minValue && parseFloat( field.param.minValue ) > fieldValue ) {
                        return {
                            input      : field.input,
                            msg     : 'Invalid value. Value is lower than minimal value: '+ field.param.minValue
                        };
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.simulation.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

                                    for (const element of cellData) {
                                        element.includes(val.trim()) ? cellMatches = true : null;
                                    }
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.table.mt.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

              if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); }
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

            if (m.title) { (attributes || (attributes = {})).title = m.title; }
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

            if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))
              { collapsed = sp; }
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 45 mins to fix

Function _refresh has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    async _refresh(index, modelMetadata ) {
        let O = this;
        let rowData = O._tableData[index];
        rowData.modelMetadata = modelMetadata;
        let modelName = O._getData( modelMetadata, 'generalInformation', 'name' );
Severity: Minor
Found in de.bund.bfr.knime.js/src/js/app/app.table.mt.js - About 45 mins 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

Avoid deeply nested control flow statements.
Open

                    if ( field.param.maxValue && parseFloat( field.param.maxValue ) < fieldValue ) {
                        return {
                            input      : field.input,
                            msg     : 'Invalid value. Value is higher than maximum value: '+ field.param.maxValue
                        };
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.simulation.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

                    if(data === "(Data)"){data = "Data model";}
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.table.mt.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

                                if( ! cellMatches ) {
                                    rowMatchesFilter = false;
                                }
Severity: Major
Found in de.bund.bfr.knime.js/src/js/app/app.table.mt.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

            if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 45 mins to fix

Avoid deeply nested control flow statements.
Open

          if (m.explicitlyCleared) {
            if (!line.markedSpans) { break }
            else {--i; continue}
          }
Severity: Major
Found in de.bund.bfr.knime.js/js-lib/codemirror-5.49.2/lib/codemirror.js - About 45 mins to fix
Severity
Category
Status
Source
Language