tom-weatherhead/thaw-grammar

View on GitHub

Showing 76 of 181 total issues

Avoid too many return statements within this function.
Open

                                return new SmalltalkFloat(twoArgumentDoubleOperator(f, f2));
Severity: Major
Found in src/languages/smalltalk/domain-object-model/operator-usage.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return `(${expr.operatorName} ${exprListString})`;
    Severity: Major
    Found in src/languages/lisp/domain-object-model/macro-definition.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                                  return arg0.value.localeCompare(arg1.value) < 0
                                      ? globalInfo.trueValue
                                      : globalInfo.falseValue;
      Severity: Major
      Found in src/languages/smalltalk/domain-object-model/operator-usage.ts - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return `(cond ${exprPairListString})`;
        Severity: Major
        Found in src/languages/lisp/domain-object-model/macro-definition.ts - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return `(${feAsString} ${expr.expressionList
                          .map((x) => this.objectToString_ApostrophesToQuoteKeywords(x))
                          .join(' ')})`;
          Severity: Major
          Found in src/languages/lisp/domain-object-model/macro-definition.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                                return new SmalltalkArray(n);
            Severity: Major
            Found in src/languages/smalltalk/domain-object-model/operator-usage.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return `(let* (${bindingsString}) ${this.objectToString_ApostrophesToQuoteKeywords(
                              expr.expression
                          )})`;
              Severity: Major
              Found in src/languages/lisp/domain-object-model/macro-definition.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return `(lambda ${expr.argList} ${this.objectToString_ApostrophesToQuoteKeywords(
                                expr.body
                            )})`;
                Severity: Major
                Found in src/languages/lisp/domain-object-model/macro-definition.ts - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                              return `(call/cc ${this.objectToString_ApostrophesToQuoteKeywords(expr.body)})`;
                  Severity: Major
                  Found in src/languages/lisp/domain-object-model/macro-definition.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                        return new SmalltalkInteger(a.length);
                    Severity: Major
                    Found in src/languages/smalltalk/domain-object-model/operator-usage.ts - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                      return `(${feAsString})`;
                      Severity: Major
                      Found in src/languages/lisp/domain-object-model/macro-definition.ts - About 30 mins to fix

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

                            constructor(
                                v: string | undefined = undefined,
                                expr: IPrologExpression | undefined = undefined // To conveniently make a substitution with a single entry.
                            ) {
                                if (typeof v !== 'undefined' && typeof expr !== 'undefined') {
                        Severity: Minor
                        Found in src/languages/prolog/domain-object-model/prolog-substitution.ts - 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 RenameVariables has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public RenameVariables(
                                variablesToAvoid: IImmutableSet<IPrologVariable>,
                                globalInfo: PrologGlobalInfo
                            ): PrologClause {
                                const oldVariables = this.FindBindingVariables();
                        Severity: Minor
                        Found in src/languages/prolog/domain-object-model/prolog-clause.ts - 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 expressionToSExpression has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            private expressionToSExpression(
                                expr: IExpression<ISExpression>,
                                globalInfo: IGlobalInfo<ISExpression>
                            ): ISExpression {
                                if (typeof globalInfo.tokenizer === 'undefined') {
                        Severity: Minor
                        Found in src/languages/lisp/domain-object-model/macro-definition.ts - 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(
                                v: string | undefined = undefined,
                                expr: ILCExpression | undefined = undefined // To conveniently make a substitution with a single entry.
                            ) {
                                if (typeof v !== 'undefined' && typeof expr !== 'undefined') {
                        Severity: Minor
                        Found in src/languages/lambda-calculus/domain-object-model/substitution.ts - 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 evaluate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public evaluate(
                                globalInfo: IGlobalInfo<ICLUValue>,
                                // eslint-disable-next-line @typescript-eslint/no-unused-vars
                                localEnvironment?: IEnvironmentFrame<ICLUValue>,
                                // eslint-disable-next-line @typescript-eslint/no-unused-vars
                        Severity: Minor
                        Found in src/languages/clu/domain-object-model/cluster.ts - 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