handsontable/formula-parser

View on GitHub

Showing 6 of 20 total issues

File supported-formulas.js has 388 lines of code (exceeds 250 allowed). Consider refactoring.
Open

const SUPPORTED_FORMULAS = [
  'ABS',
  'ACCRINT',
  'ACOS',
  'ACOSH',
Severity: Minor
Found in src/supported-formulas.js - About 5 hrs to fix

    Function func has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
    Open

    export default function func(symbol) {
      return function __formulaFunction(...params) {
        symbol = symbol.toUpperCase();
    
        const symbolParts = symbol.split('.');
    Severity: Minor
    Found in src/evaluate-by-operator/operator/formula-function.js - About 2 hrs 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 func has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function func(symbol) {
      return function __formulaFunction(...params) {
        symbol = symbol.toUpperCase();
    
        const symbolParts = symbol.split('.');
    Severity: Minor
    Found in src/evaluate-by-operator/operator/formula-function.js - About 1 hr to fix

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

        return function __formulaFunction(...params) {
          symbol = symbol.toUpperCase();
      
          const symbolParts = symbol.split('.');
          let foundFormula = false;
      Severity: Minor
      Found in src/evaluate-by-operator/operator/formula-function.js - About 1 hr to fix

        Function _callRangeValue has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          _callRangeValue(startLabel, endLabel) {
            startLabel = startLabel.toUpperCase();
            endLabel = endLabel.toUpperCase();
        
            const [startRow, startColumn] = extractLabel(startLabel);
        Severity: Minor
        Found in src/parser.js - About 1 hr to fix

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

            parse(expression) {
              let result = null;
              let error = null;
          
              try {
          Severity: Minor
          Found in src/parser.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

          Severity
          Category
          Status
          Source
          Language