The problem I have just encountered was attempting to encode an exclusion for the following lint error:
internal/api/function.go:76:2: unhandled-error: Unhandled error in call to function w.Flush (revive)
w.Flush()
It is not clear from the error message that the function name used when processing ignored regular expressions from the configuration is in fact text/tabwriter.Writer.Flush not w.Flush. I did eventually figure out the right function name but I previously guessed wrong that it might be tabwriter.Writer.Flush or Writer.Flush. I think this error message could be friendlier to users.
Proposed Solution
I suggest that the function name in the error message should match the one used for exclusions. In particular, in this case the error message should be:
internal/api/function.go:76:2: unhandled-error: Unhandled error in call to function text/tabwriter.Writer.Flush (revive)
w.Flush()
Problem
The problem I have just encountered was attempting to encode an exclusion for the following lint error:
It is not clear from the error message that the function name used when processing ignored regular expressions from the configuration is in fact
text/tabwriter.Writer.Flush
notw.Flush
. I did eventually figure out the right function name but I previously guessed wrong that it might betabwriter.Writer.Flush
orWriter.Flush
. I think this error message could be friendlier to users.Proposed Solution
I suggest that the function name in the error message should match the one used for exclusions. In particular, in this case the error message should be: