denzyldick / phanalist

Performant static analyzer for PHP, which is extremely easy to use. It helps you catch common mistakes in your PHP code.
https://denzyldick.github.io/phanalist/
MIT License
127 stars 5 forks source link

E0010 #45

Closed denzyldick closed 6 months ago

denzyldick commented 6 months ago

With this new rule we can calculate the amount of paths in a code block.

SerheyDolgushev commented 6 months ago

Nice job! :) I tried to run it on a big codebase and got the following error:

Using configuration file ./phanalist.yaml

Scanning files in ./src ...
███████████████████████████░░░░░░░░░░░░░░░░░░░░░░ 350/1694
thread 'main' has overflowed its stack
fatal runtime error: stack overflow
zsh: abort      
SerheyDolgushev commented 6 months ago

@denzyldick https://github.com/denzyldick/phanalist/pull/45/commits/6ee6cb279582855d58165aaeb75d1f8c7d77d17a fixes the "stack overflow" issue for me.

Can you please check if it works with this change as expected for you?

denzyldick commented 6 months ago

Oh, nice. I did not have that issue. Can you share the PHP code?

SerheyDolgushev commented 6 months ago

@denzyldick please note this changes: https://github.com/denzyldick/phanalist/pull/45/commits/c694892573b016e19aaae45c7332fa2669a028e2

SerheyDolgushev commented 6 months ago

Oh, nice. I did not have that issue. Can you share the PHP code?

Sorry, I can not share the PHP code I used for this case, but I am pretty sure it should be reproducible with any big PHP codebase.