Wonder-Technology/Wonder-Editor

View on GitHub
lib/es6_global/src/core/composable_component/mainEditor/composable_component/bottom_components/composable_component/project/composable_component/asset/composable_component/header/ui/MainEditorAssetHeader.js

Summary

Maintainability
A
1 hr
Test Coverage

Function _renderSelectNav has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Wontfix

function _renderSelectNav(uiState, dispatchFunc, languageType, param) {
  return React.createElement("div", {
              className: "item-content"
            }, React.createElement("div", {
                  className: "content-section",

    Function render has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Confirmed

    function render(param, self) {
      var send = self[/* send */3];
      var dispatchFunc = param[1];
      var uiState = param[0];
      var languageType = StateLogicService$WonderEditor.getEditorState(LanguageEditorService$WonderEditor.unsafeGetType);

      Function reducer has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Wontfix

      function reducer(action, state) {
        if (typeof action === "number") {
          if (action !== 0) {
            return /* Update */Block.__(0, [/* record */[
                        /* isSelectNav */false,

      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

      There are no issues that match your filters.

      Category
      Status