Skip to content

ValidHookName: make the NotString warning more actionable #247

Open
@jrfnl

Description

@jrfnl

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 severity 3 and 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 to 3 or 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions