lib/es6_global/src/core/atom_component/dragTree/component/treeNode/SceneTreeNode.js
File SceneTreeNode.js
has 275 lines of code (exceeds 250 allowed). Consider refactoring. Confirmed
Confirmed
import * as Block from "../../../../../../../../node_modules/bs-platform/lib/es6/block.js";
import * as Curry from "../../../../../../../../node_modules/bs-platform/lib/es6/curry.js";
import * as React from "react";
Function reducer
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Wontfix
Wontfix
function reducer(isShowChildren, param, action, state) {
var handleToggleShowTreeChildren = param[2];
var dragWDB = param[1];
var dragGameObject = param[0];
if (typeof action === "number") {
Function make
has 17 arguments (exceeds 4 allowed). Consider refactoring. Wontfix
Wontfix
function make(gameObject, name, isSelected, isActive, dragImg, widget, onSelect, dragGameObject, dragWDB, isWidget, isShowChildren, isHasChildren, checkNodeRelation, handleToggleShowTreeChildren, isAssetWDBFile, treeChildren, _children) {
Function _renderDragableText
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Wontfix
Wontfix
function _renderDragableText(param, param$1, param$2) {
var isAssetWDBFileFunc = param$2[3];
var checkNodeRelationFunc = param$2[2];
var isWidgetFunc = param$2[1];
var onSelectFunc = param$2[0];
Function make
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Wontfix
Wontfix
function make(gameObject, name, isSelected, isActive, dragImg, widget, onSelect, dragGameObject, dragWDB, isWidget, isShowChildren, isHasChildren, checkNodeRelation, handleToggleShowTreeChildren, isAssetWDBFile, treeChildren, _children) {
var partial_arg = /* tuple */[
dragGameObject,
dragWDB,
handleToggleShowTreeChildren
Function reducer
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Wontfix
Wontfix
function reducer(isShowChildren, param, action, state) {
var handleToggleShowTreeChildren = param[2];
var dragWDB = param[1];
var dragGameObject = param[0];
if (typeof action === "number") {
- Read upRead up
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"