Closed viktormatrai closed 2 years ago
This is working as intended. You can use the -ignoreNames
and -ignoreDecls
flags (or ignore-names
and ignore-decls
settings in golangci-lint) to ignore special cases. Alternatively, change -minNameLength
/min-name-length
, or use a nolint:varnamelen
directive in the source line.
Hi!
I just updated a service from go 1.16 to 1.18 and unfortunately recently I have to disable this linter because it is deciding to raise issues of scope of usage, for such things as:
var ad Ad
Ad is an actual noun, which has two characters in it.
For i loop:
Raises the same issue for the "i". I think the iterator's naming is being "i" since the beginning of time, maybe it should be an exception.
Range loop:
For example if you're having a slice named Ads, for which you create a range loop the element will be ad (which is the singular version of ads).