lowdefy/lowdefy

View on GitHub

Showing 198 of 9,127 total issues

Avoid too many return statements within this function.
Confirmed

  return 1;
Severity: Major
Found in packages/layout/src/deriveLayout.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Confirmed

      return 0;
    Severity: Major
    Found in packages/layout/src/deriveLayout.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          return 'generator';
      Severity: Major
      Found in packages/utils/helpers/src/type.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

          if (isDate(val)) return 'date';
        Severity: Major
        Found in packages/utils/helpers/src/type.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

            if (isArray(val)) return 'array';
          Severity: Major
          Found in packages/utils/helpers/src/type.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

              if (isRegexp(val)) return 'regexp';
            Severity: Major
            Found in packages/utils/helpers/src/type.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                if (type === 'symbol') return 'symbol';
              Severity: Major
              Found in packages/utils/helpers/src/type.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                  if (isError(val)) return 'error';
                Severity: Major
                Found in packages/utils/helpers/src/type.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      return `{${out.join(',')}${indent}}`;
                  Severity: Major
                  Found in packages/utils/helpers/src/stableStringify.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                      if (type === 'number') return 'number';
                    Severity: Major
                    Found in packages/utils/helpers/src/type.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                        if (isArguments(val)) return 'arguments';
                      Severity: Major
                      Found in packages/utils/helpers/src/type.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                          if (isBuffer(val)) return 'buffer';
                        Severity: Major
                        Found in packages/utils/helpers/src/type.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                              return isGeneratorFn(val) ? 'generatorfunction' : 'function';
                          Severity: Major
                          Found in packages/utils/helpers/src/type.js - About 30 mins to fix

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

                            function checkAuthorizedHost({ license, req }) {
                              const authorizedUrls = license.metadata?.domains ?? [];
                              if (authorizedUrls.length === 0) {
                                return true;
                              }
                            Severity: Minor
                            Found in packages/servers/server-enterprise/lib/server/checkAuthorizedHost.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 callActionLoop has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Confirmed

                              async callActionLoop({ actions, arrayIndices, block, event, progress, responses }) {
                                for (const [index, action] of actions.entries()) {
                                  try {
                                    if (action.async === true) {
                                      this.callAsyncAction({
                            Severity: Minor
                            Found in packages/engine/src/Actions.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 ControlledListBlock has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                            const ControlledListBlock = ({
                              blockId,
                              components: { Icon, Link },
                              events,
                              list,

                            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 initLowdefyContext has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Confirmed

                            function initLowdefyContext({ auth, Components, config, lowdefy, router, stage, types, window }) {
                              if (!lowdefy._internal?.initialised) {
                                lowdefy._internal = {
                                  actions: types.actions,
                                  blockComponents: types.blocks,
                            Severity: Minor
                            Found in packages/client/src/initLowdefyContext.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 TextAreaBlock has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Confirmed

                            const TextAreaBlock = ({
                              blockId,
                              components,
                              events,
                              loading,
                            Severity: Minor
                            Found in packages/plugins/blocks/blocks-antd/src/blocks/TextArea/TextArea.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 PageHeaderMenu has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                            const PageHeaderMenu = ({
                              basePath,
                              blockId,
                              components: { Icon, Link },
                              content,

                            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 handler has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                            Open

                            async function handler({ context, req, res }) {
                              if (authJson.configured !== true) {
                                return res.status(404).json({
                                  message: 'Auth not configured',
                                });
                            Severity: Minor
                            Found in packages/servers/server-enterprise/pages/api/auth/[...nextauth].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