AdaCore / libadalang-tools

Libadalang-based tools
GNU General Public License v3.0
16 stars 13 forks source link

Why gnat metric skips exception handler #22

Closed DamDC91 closed 1 year ago

DamDC91 commented 2 years ago

Hi,

I don't understand why gnat metric (this one or the ASIS one) is skipping exception handlers while computing the cyclomatic complexity.

https://github.com/AdaCore/libadalang-tools/blob/2864a744e575d1b3d947d10bdce25f0d6311011d/src/metrics-actions.adb#L2853-L2855

I was expecting exception handlers to increase the cyclomatic complexity by one and the statements inside it to be taking into account in the complexity of the subprogram.

Can you explain me why are you skipping it?

Best regards, Damien