Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValidHookName: make the NotString warning more actionable #247

Open
jrfnl opened this issue Jun 16, 2021 · 2 comments
Open

ValidHookName: make the NotString warning more actionable #247

jrfnl opened this issue Jun 16, 2021 · 2 comments

Comments

@jrfnl
Copy link
Collaborator

jrfnl commented Jun 16, 2021

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.

@jrfnl
Copy link
Collaborator Author

jrfnl commented Sep 22, 2023

Let's do a check what the impact would be if this would become severity 5 and then discuss further.

@jrfnl
Copy link
Collaborator Author

jrfnl commented Nov 4, 2023

An initial improvement to the message is included in #335. The impact analysis of raising the severity to 5 still needs to be assessed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant