The point I was making is not simply to ignore a linter outcome, but add
the reason behind it.
It might be a bad comment in your opinion, but that was not the point.
Op di 7 mrt 2023 om 18:42 schreef Kurtis Rader :
> On Mon, Mar 6, 2023 at 10:38 PM Marcello H wrote:
>
>> What I do (and is a goo
On Mon, Mar 6, 2023 at 10:38 PM Marcello H wrote:
> What I do (and is a good practice), is adding behind the comment more info.
>
> //nolint:errcheck // no need to test it, because it was tested before with
> stat
I appreciate that you're replying to what I hope is just a bad example but
please
What I do (and is a good practice), is adding behind the comment more info.
//nolint:errcheck // no need to test it, because it was tested before with
stat
Op maandag 6 maart 2023 om 23:05:42 UTC+1 schreef Steven Hartland:
> I would use the following if I truly wanted to ignore an error, but I
I would use the following if I truly wanted to ignore an error, but I would
question if ignoring the error from os.Open was ever a good idea. If you
want to handle a file not found error then do so, don't just ignore the
error.
file, _ := os.Open(name) //nolint: errcheck
On Mon, 6 Mar 2023 at 20:1