kachkaev/humane-math

View on GitHub

Showing 71 of 138 total issues

Avoid too many return statements within this function.
Open

    return currentNode;
Severity: Major
Found in src/core/analysis/2-syntactic/tree.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            return;
    Severity: Major
    Found in src/core/analysis/3-semantic/validator.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return;
      Severity: Major
      Found in src/core/analysis/3-semantic/validator.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            return result;
        Severity: Major
        Found in src/core/calculator.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return currentNode;
          Severity: Major
          Found in src/core/analysis/2-syntactic/tree.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                  return;
            Severity: Major
            Found in src/core/analysis/3-semantic/validator.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                    return;
              Severity: Major
              Found in src/core/analysis/3-semantic/validator.js - About 30 mins to fix

                Function addFunction has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                  addFunction(aliases, executor, argumentCount = 1, nonSimplifiable = false, calculateForNaNs = false) {
                    var currentFunctionDefinition = {};
                    currentFunctionDefinition.id = this.extractIdFromAliases(aliases);
                
                    currentFunctionDefinition.aliases = aliases;
                Severity: Minor
                Found in src/core/config/symbols.js - About 25 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

                Function clearCachedValues has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                  clearCachedValues(treeNode) {
                    if (treeNode instanceof Text) {
                      treeNode = treeNode.tree.root;
                    }
                
                
                Severity: Minor
                Found in src/core/calculator.js - About 25 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

                Function constructor has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                  constructor(...listsToJoin) {
                    this.clear();
                
                    // Join input argument lists if any arguments were passed.
                    if (listsToJoin.length) {
                Severity: Minor
                Found in src/core/analysis/message-list.js - About 25 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

                Function cloneWithCorrectedType has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                Open

                  cloneWithCorrectedType() {
                    var clone = _.clone(this);
                
                    // Substitution of a type for error tokens
                    if (clone.isErrorToken()) {
                Severity: Minor
                Found in src/core/analysis/1-lexical/token.js - About 25 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