LifeMC/LifeSkript

Method 'loadScript' is too complex to analyze by data flow algorithm

Opened this issue · 1 comments

Describe the bug
IntelliJ gives warning "Method 'loadScript' is too complex to analyze by data flow algorithm" in the ScriptLoader#loadScript method.

To Reproduce
Open ScriptLoader and navigate to loadScript method in IntelliJ (tested on IntelliJ IDEA Ultimate Edition 2019.2)

Expected behavior
Expected no warning. Method should be splitted to other methods to reduce its code complexity.

Screenshots
N/A

Version information:

  • Minecraft Version: N/A
  • Skript Version: 2.2.18 Development Build (master)

Additional information
N/A

Likely can be fixed by splitting configuration section and some other stuff into small other methods. It will also help performance by smalling the method size and making it more applicable to be optimized by JIT.