ValidHookName: make the `NotString` warning more actionable
The ValidHookName sniff contains a warning when dynamic hook names are encountered to manually examine those for hook name length. The maximum word count is configurable, not fixed.
Hook name could not reliably be examined for maximum word count. Please verify this hook name manually. Found: %s
Note: this warning is at
severity3and will not show by default so as to not be CI blocking. It will be shown only when the minimum severity for a run is explicitly lowered to3or lower.
When looking at this message, it is not directly actionable as it doesn't mention what the maximum word count is.
By the looks of it, the sniff can possibly also be improved further to throw this warning less often.
If the non-dynamic part of a dynamic hook name contains text which would already create a violation against the maximum word count, the TooLong or MaxExceeded warning/error should be thrown instead - in so far as this is determinable, of course.
Let's do a check what the impact would be if this would become severity 5 and then discuss further.
An initial improvement to the message is included in #335. The impact analysis of raising the severity to 5 still needs to be assessed.