lowdefy/lowdefy

View on GitHub

Showing 9,050 of 9,129 total issues

Function reviver has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    const reviver = (_, value) => {
      if (!type.isObject(value)) return value;
      // TODO: pass ~r in errors. Build does not have ~k.
      if (type.isString(value['~r'])) return value;
      if (Object.keys(value).length !== 1) return value;
Severity: Minor
Found in packages/operators/src/buildParser.js - About 1 hr to fix

    Function disabledDate has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const disabledDate = (disabledDates = {}) => {
      const min = type.isNone(disabledDates.min)
        ? undefined
        : moment(disabledDates.min).utc().startOf('day');
      const max = type.isNone(disabledDates.max)
    Severity: Minor
    Found in packages/plugins/blocks/blocks-antd/src/disabledDate.js - About 1 hr to fix

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

      function apiWrapper(handler) {
        return async function wrappedHandler(req, res) {
          const context = {
            // Important to give absolute path so Next can trace build files
            rid: crypto.randomUUID(),
      Severity: Minor
      Found in packages/servers/server-dev/lib/server/apiWrapper.js - About 1 hr to fix

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

        const getLabelCol = (value, inline) => {
          if (inline) {
            return { flex: '0 1 auto' };
          }
          const defaultVal = {
        Severity: Minor
        Found in packages/plugins/blocks/blocks-antd/src/blocks/Label/getLabelCol.js - About 1 hr to fix

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

          function apiWrapper(handler) {
            return async function wrappedHandler(req, res) {
              const context = {
                // Important to give absolute path so Next can trace build files
                rid: crypto.randomUUID(),
          Severity: Minor
          Found in packages/servers/server-enterprise/lib/server/apiWrapper.js - About 1 hr to fix

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

            const getWrapperCol = (value, inline) => {
              if (inline) {
                return { flex: '1 1 auto' };
              }
              const defaultVal = {

              Function setBlocksCache has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Confirmed

                setBlocksCache() {
                  this.loopBlocks((block) => {
                    if (block.update) {
                      block.update = false;
                      block.eval = {
              Severity: Minor
              Found in packages/engine/src/Blocks.js - About 1 hr to fix

                Identical blocks of code found in 6 locations. Consider refactoring.
                Open

                const RatingSlider = ({
                  blockId,
                  components: { Icon, Link },
                  events,
                  loading,
                packages/plugins/blocks/blocks-antd/src/blocks/Slider/Slider.js on lines 24..73
                packages/plugins/blocks/blocks-antd/src/blocks/PhoneNumberInput/PhoneNumberInput.js on lines 125..261
                packages/plugins/blocks/blocks-antd/src/blocks/Selector/Selector.js on lines 28..152
                packages/plugins/blocks/blocks-antd/src/blocks/Switch/Switch.js on lines 24..102
                packages/plugins/blocks/blocks-antd/src/blocks/WeekSelector/WeekSelector.js on lines 28..86

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 59.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 6 locations. Consider refactoring.
                Open

                const SwitchBlock = ({
                  blockId,
                  components: { Icon, Link },
                  events,
                  loading,
                packages/plugins/blocks/blocks-antd/src/blocks/Slider/Slider.js on lines 24..73
                packages/plugins/blocks/blocks-antd/src/blocks/PhoneNumberInput/PhoneNumberInput.js on lines 125..261
                packages/plugins/blocks/blocks-antd/src/blocks/RatingSlider/RatingSlider.js on lines 72..237
                packages/plugins/blocks/blocks-antd/src/blocks/Selector/Selector.js on lines 28..152
                packages/plugins/blocks/blocks-antd/src/blocks/WeekSelector/WeekSelector.js on lines 28..86

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 59.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 6 locations. Consider refactoring.
                Open

                const SliderBlock = ({
                  blockId,
                  components: { Icon, Link },
                  events,
                  loading,
                packages/plugins/blocks/blocks-antd/src/blocks/PhoneNumberInput/PhoneNumberInput.js on lines 125..261
                packages/plugins/blocks/blocks-antd/src/blocks/RatingSlider/RatingSlider.js on lines 72..237
                packages/plugins/blocks/blocks-antd/src/blocks/Selector/Selector.js on lines 28..152
                packages/plugins/blocks/blocks-antd/src/blocks/Switch/Switch.js on lines 24..102
                packages/plugins/blocks/blocks-antd/src/blocks/WeekSelector/WeekSelector.js on lines 28..86

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 59.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 6 locations. Consider refactoring.
                Open

                const WeekSelector = ({
                  blockId,
                  components: { Icon, Link },
                  events,
                  loading,
                packages/plugins/blocks/blocks-antd/src/blocks/Slider/Slider.js on lines 24..73
                packages/plugins/blocks/blocks-antd/src/blocks/PhoneNumberInput/PhoneNumberInput.js on lines 125..261
                packages/plugins/blocks/blocks-antd/src/blocks/RatingSlider/RatingSlider.js on lines 72..237
                packages/plugins/blocks/blocks-antd/src/blocks/Selector/Selector.js on lines 28..152
                packages/plugins/blocks/blocks-antd/src/blocks/Switch/Switch.js on lines 24..102

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 59.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 6 locations. Consider refactoring.
                Open

                const Selector = ({
                  blockId,
                  components: { Icon, Link },
                  events,
                  loading,
                packages/plugins/blocks/blocks-antd/src/blocks/Slider/Slider.js on lines 24..73
                packages/plugins/blocks/blocks-antd/src/blocks/PhoneNumberInput/PhoneNumberInput.js on lines 125..261
                packages/plugins/blocks/blocks-antd/src/blocks/RatingSlider/RatingSlider.js on lines 72..237
                packages/plugins/blocks/blocks-antd/src/blocks/Switch/Switch.js on lines 24..102
                packages/plugins/blocks/blocks-antd/src/blocks/WeekSelector/WeekSelector.js on lines 28..86

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 59.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Function getHomeAndMenus has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Confirmed

                async function getHomeAndMenus(context) {
                  const menus = await getMenus(context);
                
                  const homePageId = get(context.config, 'homePageId');
                  if (homePageId) {
                Severity: Minor
                Found in packages/api/src/routes/rootConfig/getHomeAndMenus.js - About 1 hr to fix

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                                                  properties: {
                                                    title: {
                                                      type: 'string',
                                                      description: 'Menu item title.',
                                                    },
                  Severity: Major
                  Found in packages/utils/block-utils/src/blockSchema.js and 1 other location - About 1 hr to fix
                  packages/utils/block-utils/src/blockSchema.js on lines 132..146

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 59.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Identical blocks of code found in 2 locations. Consider refactoring.
                  Open

                                          properties: {
                                            title: {
                                              type: 'string',
                                              description: 'Menu item title.',
                                            },
                  Severity: Major
                  Found in packages/utils/block-utils/src/blockSchema.js and 1 other location - About 1 hr to fix
                  packages/utils/block-utils/src/blockSchema.js on lines 173..187

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 59.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Function BrandTag has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const BrandTag = () => {
                    const [showBranding, setShowBranding] = useState(false);
                    useEffect(() => {
                      checkEntitlement({ setShowBranding });
                    }, []);
                  Severity: Minor
                  Found in packages/client/src/BrandTag.js - About 1 hr to fix

                    Function reducer has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Confirmed

                    function reducer(state, action) {
                      switch (action.type) {
                        case 'increment':
                          return {
                            ...state,
                    Severity: Minor
                    Found in packages/client/src/ProgressBarController.js - About 1 hr to fix

                      Function render has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        render() {
                          const { div, id, methods, style } = this.props;
                          if (div === true) {
                            return (
                              <div
                      Severity: Minor
                      Found in packages/utils/block-utils/src/HtmlComponent.js - About 1 hr to fix

                        Function hasValues has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const hasValues = (val) => {
                          switch (type.typeOf(val)) {
                            case 'boolean':
                            case 'date':
                            case 'function':
                        Severity: Minor
                        Found in packages/utils/helpers/src/unset.js - About 1 hr to fix

                          Function build has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          async function build(options) {
                            const context = createContext(options);
                            const components = await buildRefs({ context });
                            testSchema({ components, context });
                            buildApp({ components, context });
                          Severity: Minor
                          Found in packages/build/src/index.js - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language