RubyLouvre/anu

View on GitHub

Showing 286 of 880 total issues

File ReactErrorBoundaries-test.internal.js has 1807 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

let PropTypes;
let React;
let ReactDOM;
Severity: Major
Found in packages/render/dom/__tests__/ReactErrorBoundaries-test.internal.js - About 4 days to fix

    File ReactCompositeComponent-test.js has 1427 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    "use strict";
    
    let ChildUpdates;
    let MorphingComponent;
    let React;
    Severity: Major
    Found in packages/render/dom/__tests__/ReactCompositeComponent-test.js - About 3 days to fix

      File ReactDOMInput-test.js has 1377 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      
      'use strict';
      
      const emptyFunction = function(){}
      
      
      Severity: Major
      Found in packages/render/dom/__tests__/ReactDOMInput-test.js - About 3 days to fix

        File ReactChildren-test.js has 1127 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        
        "use strict";
        
        describe("ReactChildren", () => {
            let React;
        Severity: Major
        Found in packages/core/__tests__/ReactChildren-test.js - About 2 days to fix

          File ReactUpdates-test.js has 1106 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          
          'use strict';
          
          let React;
          let ReactDOM;
          Severity: Major
          Found in packages/render/dom/__tests__/ReactUpdates-test.js - About 2 days to fix

            File ReactComponentLifeCycle-test.js has 969 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            'use strict';
            
            let React;
            let ReactDOM;
            let ReactTestUtils;
            Severity: Major
            Found in packages/render/dom/__tests__/ReactComponentLifeCycle-test.js - About 2 days to fix

              File ReactDOMFiber-test.js has 945 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              'use strict';
              
              const React = require('react');
              const ReactDOM = require('react-dom');
              const ReactTestUtils = require('test-utils');
              Severity: Major
              Found in packages/render/dom/__tests__/ReactDOMFiber-test.js - About 2 days to fix

                File ReactMultiChildReconcile-test.js has 734 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                const React = require('react');
                const ReactDOM = require('react-dom');
                
                const stripEmptyValues = function(obj) {
                  const ret = {};
                Severity: Major
                Found in packages/render/dom/__tests__/ReactMultiChildReconcile-test.js - About 1 day to fix

                  Function resolve has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function resolve(child, context) {
                      while (isValidElement(child)) {
                          // Safe because we just checked it's an element.
                          let element = child;
                          let Component = element.type;
                  Severity: Minor
                  Found in packages/render/server/Renderer.js - About 1 day 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

                  File ReactDOMSelect-test.js has 589 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /**
                   * Copyright (c) 2013-present, Facebook, Inc.
                   *
                   * This source code is licensed under the MIT license found in the
                   * LICENSE file in the root directory of this source tree.
                  Severity: Major
                  Found in packages/render/dom/__tests__/ReactDOMSelect-test.js - About 1 day to fix

                    File createReactClassIntegration-test.js has 572 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    'use strict';
                    
                    let PropTypes;
                    let React;
                    let ReactDOM;
                    Severity: Major
                    Found in packages/core/__tests__/createReactClassIntegration-test.js - About 1 day to fix

                      File index.js has 563 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      const ReactDOMServerIntegrationUtils = require('./utils/ReactDOMServerIntegrationTestUtils');
                      
                      let React;
                      let ReactDOM;
                      let ReactDOMServer;
                      Severity: Major
                      Found in packages/render/server/__tests2__/index.js - About 1 day to fix

                        File ReactComponent-test.js has 546 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        'use strict';
                        
                        let React;
                        let ReactDOM;
                        let ReactDOMServer;
                        Severity: Major
                        Found in packages/render/dom/__tests__/ReactComponent-test.js - About 1 day to fix

                          Function exports has 216 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          module.exports = function(initModules) {
                            let ReactDOM;
                            let ReactDOMServer;
                          
                            function resetModules() {

                            File ReactES6Class-test.js has 514 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            let PropTypes;
                            let React;
                            let ReactDOM;
                            
                            describe('ReactES6Class', () => {
                            Severity: Major
                            Found in packages/core/__tests__/ReactES6Class-test.js - About 1 day to fix

                              File index.jsx has 486 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              /* eslint-disable jsx-a11y/anchor-has-content */
                              import { miniCreateClass, getWindow } from "react-core/util";
                              
                              import {
                                  startsWith,
                              Severity: Minor
                              Found in packages/router/index.jsx - About 7 hrs to fix

                                File ReactProxy.js has 483 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                /**
                                 * by 司徒正美 Copyright 2018-05-15
                                 * IE9+
                                 */
                                
                                
                                Severity: Minor
                                Found in lib/ReactProxy.js - About 7 hrs to fix

                                  File Renderer.js has 464 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  /**
                                   * Copyright (c) 2013-present, Facebook, Inc.
                                   *
                                   * This source code is licensed under the MIT license found in the
                                   * LICENSE file in the root directory of this source tree.
                                  Severity: Minor
                                  Found in packages/render/server/Renderer.js - About 7 hrs to fix

                                    File ReactMount-test.js has 461 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    
                                    'use strict';
                                    
                                    
                                    let React;
                                    Severity: Minor
                                    Found in packages/render/dom/__tests__/ReactMount-test.js - About 7 hrs to fix

                                      Function findCatchComponent has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      function findCatchComponent(fiber, names, hook) {
                                          let instance,
                                              name,
                                              topFiber = fiber,
                                              retry,
                                      Severity: Minor
                                      Found in packages/fiber/ErrorBoundary.js - About 6 hrs 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