RubyLouvre/anu

View on GitHub

Showing 286 of 880 total issues

Avoid deeply nested control flow statements.
Open

                    if (
                        props.type === "radio" &&
                        name != null &&
                        !radioMap[name]
                    ) {
Severity: Major
Found in packages/render/dom/duplex.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            if (v) {
                                partial.push(quote(i) + ":" + v);
                            }
    Severity: Major
    Found in lib/polyfill.js - About 45 mins to fix

      Function flattenCb has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      function flattenCb(context, child, key, childType) {
          if (child === null) {
              lastText = null;
              return;
          }
      Severity: Minor
      Found in packages/core/createElement.js - About 45 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

      Avoid deeply nested control flow statements.
      Open

                              if (hasOwnProperty.call(source,nextKey)) {
                                  output[nextKey] = source[nextKey];
                              }
      Severity: Major
      Found in lib/polyfill.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            if (value != null) {
                                updateOptions(dom, !!props.multiple, value, false);
                            }
        Severity: Major
        Found in packages/render/dom/duplex.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if (node.__events && !unique[uid]) {
                                  unique[uid] = 1;
                                  paths.push({ node, events: node.__events });
                              }
          Severity: Major
          Found in packages/render/dom/event.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if (_result) {
                                        return _result;
                                    }
            Severity: Major
            Found in lib/devtools.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if (node === end) {
                                      return paths;
                                  }
              Severity: Major
              Found in packages/render/dom/event.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    if (!node) {
                                        break inner;
                                    }
                Severity: Major
                Found in packages/render/dom/event.js - About 45 mins to fix

                  Function shallowEqual has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                  export function shallowEqual(objA, objB) {
                      if (Object.is(objA, objB)) {
                          return true;
                      }
                      //确保objA, objB都是对象
                  Severity: Minor
                  Found in packages/core/shallowEqual.js - About 45 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 eventAction has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                  export function eventAction(dom, name, val, lastProps, fiber) {
                      let events = dom.__events || (dom.__events = {});
                      events.vnode = fiber;
                      let refName = toLowerCase(name.slice(2));
                      if (val === false) {
                  Severity: Minor
                  Found in packages/render/dom/event.js - About 45 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 update has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                          update(node, props) {
                              // mount后这个属性没用
                              node._wrapperState.initialValue = void 666;
                  
                              let wasMultiple = node._wrapperState.wasMultiple;
                  Severity: Minor
                  Found in packages/render/dom/duplex.js - About 45 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 ReactElement has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  function ReactElement(type, tag, props, key, ref, owner) {
                  Severity: Minor
                  Found in packages/core/createElement.js - About 45 mins to fix

                    Function useEffectImpl has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    export function useEffectImpl(create, deps, EffectTag, createList, destroyList) {//ok
                    Severity: Minor
                    Found in packages/fiber/dispatcher.js - About 35 mins to fix

                      Function registerPageHook has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      export function registerPageHook(appHooks, pageHook, app, instance, args  ){
                      Severity: Minor
                      Found in packages/render/miniapp/registerPageHook.js - About 35 mins to fix

                        Function applybeforeUpdateHooks has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            fiber,
                            instance,
                            newProps,
                            newContext,
                            contextStack
                        Severity: Minor
                        Found in packages/fiber/beginWork.js - About 35 mins to fix

                          Function makeProps has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          function makeProps(type, config, props, children, len) {
                          Severity: Minor
                          Found in packages/core/createElement.js - About 35 mins to fix

                            Function mapChildren has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            function mapChildren(children, prefix, func, result, context) {
                            Severity: Minor
                            Found in packages/core/Children.js - About 35 mins to fix

                              Function eventAction has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              export function eventAction(dom, name, val, lastProps, fiber) {
                              Severity: Minor
                              Found in packages/render/dom/event.js - About 35 mins to fix

                                Function registerApp has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                Open

                                export function registerApp(demo, containProvider) {
                                    var app = {};
                                    // 将App构造函数存到全局中供mobx使用
                                    if (containProvider) {
                                        demo.globalData._GlobalApp = demo.constructor;
                                Severity: Minor
                                Found in packages/render/miniapp/registerApp.quick.js - About 35 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