solhint icon indicating copy to clipboard operation
solhint copied to clipboard

Consider clarify "message for require is too long" warning by adding character count

Open Dentrax opened this issue 3 years ago • 0 comments

It would be nice to see max allowed count in the warning message for reason-string module. In current implementation, it's difficult to distinguish how long error messages should be:

60:9   warning  Error message for require is too long  reason-string
61:17  warning  Error message for require is too long  reason-string

What I expect is something like:

Error message for require is 7 characters long

-or-

Error message for require longer than 80 characters

I had to deep dive into code to check default max characters count as we defined it here: https://github.com/protofire/solhint/blob/991b8755ef2babcc2c97c278b039c86abeef4b8a/lib/rules/best-practises/reason-string.js#L6

People who are not so familiar with GitHub might have struggled with this.

$ solhint --version
3.3.7

Dentrax avatar Mar 06 '22 11:03 Dentrax