RubyLouvre/anu

View on GitHub

Showing 880 of 880 total issues

Avoid too many return statements within this function.
Open

                    return dom;
Severity: Major
Found in packages/fiber/findHostInstance.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                                return '';
    Severity: Major
    Found in packages/render/server/Renderer.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                                  return '';
      Severity: Major
      Found in packages/render/server/Renderer.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            return null;
        Severity: Major
        Found in packages/fiber/findHostInstance.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                          return '';
          Severity: Major
          Found in packages/render/server/Renderer.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                            return this.renderDOM(nextElement, context, parentNamespace);
            Severity: Major
            Found in packages/render/server/Renderer.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return "attribute";
              Severity: Major
              Found in packages/render/dom/props.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return "booleanAttr";
                Severity: Major
                Found in packages/render/dom/props.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      return true;
                  Severity: Major
                  Found in lib/shallowCompare.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                        return name.indexOf("data-") === 0 || dom[name] === void 666
                            ? "attribute"
                            : "property";
                    Severity: Major
                    Found in packages/render/dom/props.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          return true;
                      Severity: Major
                      Found in packages/core/shallowEqual.js - About 30 mins to fix

                        Similar blocks of code found in 5 locations. Consider refactoring.
                        Open

                              beforeEach(() => {
                                React = require('react');
                                ReactDOM = require('react-dom');
                                ReactDOMServer = require('react-server-renderer');
                              });
                        Severity: Major
                        Found in packages/render/dom/__tests__/ReactDOMSVG-test.js and 4 other locations - About 30 mins to fix
                        packages/render/dom/__tests__/ReactCompositeComponentNestedState-test.js on lines 8..12
                        packages/render/dom/__tests__/ReactDOMOption-test.js on lines 7..11
                        packages/render/dom/__tests__/ReactDOMTextComponent-test.js on lines 17..21
                        packages/render/dom/__tests__/ReactUpdates-test.js on lines 9..13

                        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 45.

                        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

                        Similar blocks of code found in 7 locations. Consider refactoring.
                        Open

                                expect(() => ReactDOM.render(<Parent />, container)).toWarnDev(
                                    'Child: `key` is not a prop. Trying to access it will result ' +
                                    'in `undefined` being returned. If you need to access the same ' +
                                    'value within the child component, you should pass it as a different ' +
                                    'prop. (https://fb.me/react-special-props)',
                        Severity: Major
                        Found in packages/core/__tests__/ReactElement-test.js and 6 other locations - About 30 mins to fix
                        packages/core/__tests__/ReactElement-test.js on lines 112..117
                        packages/core/__tests__/ReactPureComponent-test.js on lines 69..74
                        packages/core/__tests__/ReactPureComponent-test.js on lines 103..108
                        packages/render/dom/__tests__/ReactComponent-test.js on lines 587..592
                        packages/render/dom/__tests__/ReactComponent-test.js on lines 602..607
                        packages/render/dom/__tests__/ReactMount-test.js on lines 186..191

                        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 45.

                        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

                        Similar blocks of code found in 7 locations. Consider refactoring.
                        Open

                              expect(() => ReactDOM.render(<Foo />, container)).toWarnDev(
                                'Warning: Functions are not valid as a React child. This may happen if ' +
                                'you return a Component instead of <Component /> from render. ' +
                                'Or maybe you meant to call this function rather than return it.\n' +
                                '    in Foo (at **)',
                        Severity: Major
                        Found in packages/render/dom/__tests__/ReactComponent-test.js and 6 other locations - About 30 mins to fix
                        packages/core/__tests__/ReactElement-test.js on lines 78..83
                        packages/core/__tests__/ReactElement-test.js on lines 112..117
                        packages/core/__tests__/ReactPureComponent-test.js on lines 69..74
                        packages/core/__tests__/ReactPureComponent-test.js on lines 103..108
                        packages/render/dom/__tests__/ReactComponent-test.js on lines 602..607
                        packages/render/dom/__tests__/ReactMount-test.js on lines 186..191

                        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 45.

                        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

                        Similar blocks of code found in 4 locations. Consider refactoring.
                        Open

                                ReactDOM.render(<div>{ReactDOM.createPortal(<div>portal:2</div>, portalContainer)}</div>, container);
                        Severity: Major
                        Found in packages/render/dom/__tests__/ReactDOMFiber-test.js and 3 other locations - About 30 mins to fix
                        packages/render/dom/__tests__/ReactDOMFiber-test.js on lines 199..199
                        packages/render/dom/__tests__/ReactDOMFiber-test.js on lines 434..434
                        packages/render/dom/__tests__/ReactDOMFiber-test.js on lines 442..442

                        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 45.

                        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

                                try {
                        
                                  ReactDOM.render(<Parent />, container);
                                } catch (e) {
                                  if (e.message !== 'parent sad' && e.message !== 'child sad') {
                        packages/render/dom/__tests__/ReactErrorBoundaries-test.internal.js on lines 2052..2059

                        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 45.

                        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

                        Similar blocks of code found in 3 locations. Consider refactoring.
                        Open

                            function getSiblingNode(node) {
                                while (node) {
                                    if (node.nextSibling) {
                                        return node.nextSibling;
                                    }
                        Severity: Minor
                        Found in lib/ReactInputSelection.js and 2 other locations - About 30 mins to fix
                        packages/fiber/scheduleWork.js on lines 198..205
                        scripts/build/ReactSelection.js on lines 362..369

                        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 45.

                        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

                        Similar blocks of code found in 5 locations. Consider refactoring.
                        Open

                          beforeEach(() => {
                            React = require('react');
                            ReactDOM = require('react-dom');
                            ReactTestUtils = require('test-utils');
                          });
                        Severity: Major
                        Found in packages/render/dom/__tests__/ReactUpdates-test.js and 4 other locations - About 30 mins to fix
                        packages/render/dom/__tests__/ReactCompositeComponentNestedState-test.js on lines 8..12
                        packages/render/dom/__tests__/ReactDOMOption-test.js on lines 7..11
                        packages/render/dom/__tests__/ReactDOMSVG-test.js on lines 11..15
                        packages/render/dom/__tests__/ReactDOMTextComponent-test.js on lines 17..21

                        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 45.

                        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

                        Similar blocks of code found in 3 locations. Consider refactoring.
                        Open

                        function getQueue(fiber) {
                            while (fiber) {
                                if (fiber.microtasks) {
                                    return fiber.microtasks;
                                }
                        Severity: Minor
                        Found in packages/fiber/scheduleWork.js and 2 other locations - About 30 mins to fix
                        lib/ReactInputSelection.js on lines 338..345
                        scripts/build/ReactSelection.js on lines 362..369

                        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 45.

                        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

                        Similar blocks of code found in 7 locations. Consider refactoring.
                        Open

                                expect(() => ReactDOM.render(<Parent />, container)).toWarnDev(
                                    'Child: `ref` is not a prop. Trying to access it will result ' +
                                    'in `undefined` being returned. If you need to access the same ' +
                                    'value within the child component, you should pass it as a different ' +
                                    'prop. (https://fb.me/react-special-props)',
                        Severity: Major
                        Found in packages/core/__tests__/ReactElement-test.js and 6 other locations - About 30 mins to fix
                        packages/core/__tests__/ReactElement-test.js on lines 78..83
                        packages/core/__tests__/ReactPureComponent-test.js on lines 69..74
                        packages/core/__tests__/ReactPureComponent-test.js on lines 103..108
                        packages/render/dom/__tests__/ReactComponent-test.js on lines 587..592
                        packages/render/dom/__tests__/ReactComponent-test.js on lines 602..607
                        packages/render/dom/__tests__/ReactMount-test.js on lines 186..191

                        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 45.

                        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

                        Severity
                        Category
                        Status
                        Source
                        Language