RubyLouvre/anu

View on GitHub

Showing 286 of 880 total issues

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

        update(node, props) {
            if (props.checked != null) {
                syncValue(node, "checked", !!props.checked);
            }
            const isActive = node === node.ownerDocument.activeElement;
Severity: Minor
Found in packages/render/dom/duplex.js - About 1 hr to fix

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

    function mergeStates(fiber, nextProps) {
        let instance = fiber.stateNode,
            pendings = fiber.updateQueue.pendingStates,
            n = pendings.length,
            state = fiber.memoizedState || instance.state;
    Severity: Minor
    Found in packages/fiber/beginWork.js - About 1 hr to fix

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

          var _slicedToArray = function () {
              function sliceIterator(arr, i) {
                  var _arr = []; var _n = true; var _d = false; var _e = undefined; try {
                      for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
                          _arr.push(_s.value); if (i && _arr.length === i) {
      Severity: Minor
      Found in lib/ReactProxy.js - About 1 hr to fix

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

        export function fireDuplex() {
            var radioMap = {};
            if (duplexNodes.length) {
                do {
                    let dom = duplexNodes.shift();
        Severity: Minor
        Found in packages/render/dom/duplex.js - About 1 hr to fix

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

          function collectPaths(begin, end, unique) {
              let paths = [];
              let node = begin;
              //先判定路径上有绑定事件没有
              while (node && node.nodeType == 1) {
          Severity: Minor
          Found in packages/render/dom/event.js - About 1 hr to fix

            Function drawImage has 9 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                imageResource,
                dx,
                dy,
                dWidth,
                dHeight,
            Severity: Major
            Found in packages/render/miniapp/apiForH5/canvas.js - About 1 hr to fix

              Function key has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                          ReactWX.api[key] = function(options) { 
                              var args = [].slice.call(arguments)
                              if ( ! options || Object(options) !== options ) {
                                  return needWrapper.apply(facade, args);
                              }
              Severity: Minor
              Found in packages/render/miniapp/registerAPIs.js - About 1 hr to fix

                Function setModernOffsets has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function setModernOffsets(node, offsets) {
                    if (!window.getSelection) {
                        return;
                    }
                
                
                Severity: Minor
                Found in scripts/build/ReactSelection.js - About 1 hr to fix

                  Function onUnload has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function onUnload() {
                      for (let i in usingComponents) {
                          let a = usingComponents[i];
                          if (a.reactInstances) {
                              a.reactInstances.length = 0;
                  Severity: Minor
                  Found in packages/render/miniapp/registerPage.all.js - About 1 hr to fix

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

                    export function render(vnode, root, callback) {
                        let container = createContainer(root),
                            immediateUpdate = false;
                        if (!container.hostRoot) {
                            let fiber = new Fiber({
                    Severity: Minor
                    Found in packages/fiber/scheduleWork.js - About 1 hr to fix

                      Function disposeFiber has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function disposeFiber(fiber, force) {
                          let { stateNode, effectTag } = fiber;
                          if (!stateNode) {
                              return;
                          }
                      Severity: Minor
                      Found in packages/fiber/commitWork.js - About 1 hr to fix

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

                                  render() {
                                    inst = this;
                                    const {step} = this.state;
                                    if (step === 0) {
                                      return null;
                        Severity: Minor
                        Found in packages/render/dom/__tests__/ReactDOMSVG-test.js - About 1 hr to fix

                          Function setModernOffsets has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function setModernOffsets(node, offsets) {
                                  if (!window.getSelection) {
                                      return;
                                  }
                          
                          
                          Severity: Minor
                          Found in lib/ReactInputSelection.js - About 1 hr to fix

                            Function getSVGAttributeName has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function getSVGAttributeName(name) {
                                if (svgCache[name]) {
                                    return svgCache[name];
                                }
                                const match = name.match(rhump);
                            Severity: Minor
                            Found in packages/render/dom/props.js - About 1 hr to fix

                              Function createContainer has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                              Open

                              export function createContainer(root, onlyGet, validate) {
                                  validate = validate || validateTag;
                                  if (!validate(root)) {
                                      throw `container is not a element`; // eslint-disable-line
                                  }
                              Severity: Minor
                              Found in packages/fiber/scheduleWork.js - About 1 hr 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 updateComponent has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function updateComponent(fiber, state, callback, immediateUpdate) {
                                  fiber.dirty = true;
                              
                                  let sn = typeNumber(state);
                                  let isForced = state === true;
                              Severity: Minor
                              Found in packages/fiber/scheduleWork.js - About 1 hr 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 getQuery has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function getQuery(wx, huaweiHack) {
                                  var page = wx.$page;
                                  if (page.query) { //小米快应用新规范,this.$page.query 返回页面启动时的参数数据;
                                      return page.query;
                                  }
                              Severity: Minor
                              Found in packages/render/miniapp/registerPage.quick.js - About 1 hr 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 createInstance has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                              Open

                              export function createInstance(fiber, context) {
                                  let updater = {
                                      mountOrder: Renderer.mountOrder++,
                                      enqueueSetState: returnFalse,
                                      isMounted: isMounted
                              Severity: Minor
                              Found in packages/fiber/createInstance.js - About 1 hr 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 downward has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function downward(fiber) {
                                  var found;
                                  while (fiber.lastChild) {
                                      fiber = fiber.lastChild;
                                      if (fiber.disposed || fiber.isPortal) {
                              Severity: Minor
                              Found in packages/fiber/insertPoint.js - About 1 hr 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 createElement has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                              Open

                              export function createElement(type, config, ...children) {
                                  let props = {},
                                      tag = 5,
                                      key = null,
                                      ref = null,
                              Severity: Minor
                              Found in packages/core/createElement.js - About 1 hr 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