Open
Description
Is your feature request related to a problem?
Similar to #743, both the warning and the error message displayed by the Generic.Metrics.NestingLevel sniff could be improved if they included the name of the function that caused the error.
Currently, the sniff displays the following messages:
3 | WARNING | Function's nesting level (6) exceeds 5; consider refactoring the function (Generic.Metrics.NestingLevel.TooHigh)
20 | ERROR | Function's nesting level (11) exceeds allowed maximum of 10 (Generic.Metrics.NestingLevel.MaxExceeded)
I'm suggesting we update them to something like:
3 | WARNING | Function nestingSix()'s nesting level (6) exceeds 5; consider refactoring the function (Generic.Metrics.NestingLevel.TooHigh)
20 | ERROR | Function nestingElevent()'s nesting level (11) exceeds allowed maximum of 10 (Generic.Metrics.NestingLevel.MaxExceeded)
- I have read the Contribution Guidelines and this is not a support question.
- I intend to create a pull request to implement this feature.