Skip to content

Inconsistent behavior of "revive"'s "confusing-naming" linter when used together with "nolintlint" #3476

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

Closed
4 tasks done
leonklingele opened this issue Jan 14, 2023 · 4 comments · Fixed by #5721
Closed
4 tasks done
Assignees
Labels
area: nolint Related to nolint directive and nolintlint bug Something isn't working

Comments

@leonklingele
Copy link
Contributor

leonklingele commented Jan 14, 2023

Welcome

  • Yes, I'm using a binary release within 2 latest major releases. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, config, etc.).
  • Yes, I've tried with the standalone linter if available (e.g., gocritic, go vet, etc.). (https://golangci-lint.run/usage/linters/)

Description of the problem

It seems like the confusing-naming linter of revive is behaving inconsistently when used in conjunction with the "nolintlint" linter, based on the order of which the source files are parsed / analyzed.

See the code example / steps to reproduce below.

Version of golangci-lint

$ golangci-lint --version
golangci-lint has version 1.50.1 built from v1.50.1 on 19700101-00:00:00

Configuration file

$ cat .golangci.yml
run:
  skip-dirs:
    - internal

linters-settings:
  revive:
    rules:
      - name: confusing-naming
        disabled: false

linters:
  disable-all: true
  enable:
    - nolintlint
    - revive

Go environment

$ go version && go env
go version go1.19.4 linux/amd64

Verbose output of running

$ golangci-lint cache clean
$ golangci-lint run -v
[..]
router.go:148:54: directive `//nolint:revive` is unused for linter "revive" (nolintlint)
func (app *App) handler(rctx *fasthttp.RequestCtx) { //nolint:revive

Code example or link to a public repository

$ git clone --depth 1 --b https://github.com/leonklingele/fiber
$ cd fiber

$ golangci-lint run -v
[..]
router.go:148:17: confusing-naming: Method 'handler' differs only by capitalization to method 'Handler' in app.go (revive)
func (app *App) handler(rctx *fasthttp.RequestCtx) {

# Add a "//nolint:revive" to that line (router.go:148:17) and run again:

$ golangci-lint run -v
[..]
app.go:829:17: confusing-naming: Method 'Handler' differs only by capitalization to method 'handler' in router.go (revive)
func (app *App) Handler() fasthttp.RequestHandler {
               ^
router.go:148:54: directive `//nolint:revive` is unused for linter "revive" (nolintlint)
func (app *App) handler(rctx *fasthttp.RequestCtx) { //nolint:revive

# Oh well, now it's complaining about the same issue but in app.go this time.
# Also add a "//nolint:revive" in that line (app.go:829:17) and run again:

$ golangci-lint run -v
[..]
router.go:148:54: directive `//nolint:revive` is unused for linter "revive" (nolintlint)
func (app *App) handler(rctx *fasthttp.RequestCtx) { //nolint:revive

# There seems to be no way to get rid of both errors.
@leonklingele leonklingele added the bug Something isn't working label Jan 14, 2023
leonklingele added a commit to leonklingele/fiber that referenced this issue Jan 14, 2023
leonklingele added a commit to leonklingele/fiber that referenced this issue Jan 19, 2023
@ldez ldez added the area: nolint Related to nolint directive and nolintlint label Mar 29, 2024
@horgh
Copy link

horgh commented Feb 12, 2025

This is happening for me too when updating to 1.64.2.

I'm using Go version 1.23.6.

Locally the nolints are fine for me, but on CI runs (using the same versions) I get complaints that the nolints are unnecessary:

directive `//nolint:revive // unexported return is only meant to be used in conjunction with ExecWithRetry.` is unused for linter "revive"

A colleague ran golangci-lint run --fix which removed the nolints for them, but then a pre-commit hook running golangci-lint complained about the need for nolints. run --fix for me does not get rid of the nolints.

I suspect there is some kind of caching issue going on, but I haven't been able to figure out how to reproduce it. Unfortunately the repository etc is private so I can't share that.

I believe I have seen a similar issue when updating golangci-lint in the past, but I eventually got CI to pass and moved on. Which is to say I don't think it is specific to 1.64.2.

I noticed #3228 which sounds like probably the same core problem.

Some additional information about my setup:

$ golangci-lint --version
golangci-lint has version 1.64.2 built with go1.24.0 from 1dae906b on 2025-02-11T21:44:55Z
cat .golangci.yml

$ cat .golangci.toml
[run]
# This is needed for precious, which may run multiple instances
# in parallel
allow-parallel-runners = true
go = "1.23"
tests = true
timeout = "30m"

[linters]
enable-all = true
disable = [
    # The canonical form is not always the most common form for some headers
    # and there is a small chance that switching existing strings could
    # break something.
    "canonicalheader",

    "cyclop",
    "dogsled",
    "dupl",

    # This is probably worthwhile, but there are a number of false positives
    # that would need to be addressed.
    "dupword",

    # We don't follow its policy about not defining dynamic errors.
    "err113",

    # We often don't initialize all of the struct fields. This is fine
    # generally
    "exhaustruct",

    # We tried this linter but most places we do forced type asserts are
    # pretty safe, e.g., an atomic.Value when everything is encapsulated
    # in a small package.
    "forcetypeassert",

    "funlen",
    "gochecknoglobals",
    "gochecknoinits",

    # Similar to the exhaustive linter and I don't know that we use these
    # sorts of sum types
    "gochecksumtype",

    "gocognit",
    "godox",

    # This only "caught" one thing, and it seemed like a reasonable use
    # of Han script. Generally, I don't think we want to prevent the use
    # of particular scripts. The time.Local checks might be useful, but
    # this didn't actually catch anything of note there.
    "gosmopolitan",

    # Seems too opinionated or at least would require going through all the
    # interfaces we have.
    "inamedparam",

    "ireturn",

    # We use golines instead.
    "lll",

    # We don't use these loggers
    "loggercheck",

    # Maintainability Index. Seems like it could be a good idea, but a
    # lot of things fail and we would need to make some decisions about
    # what to allow.
    "maintidx",

    # Using a const for every number doesn't necessarily increase code clarity,
    # and it would be a ton of work to move everything to that.
    "mnd",

    # Causes panics, e.g., when processing mmerrors
    "musttag",

    "nestif",

    # Perhaps too opinionated. We do have some legitimate uses of "return nil, nil"
    "nilnil",

    "nlreturn",

    # We occasionally use named returns for documentation, which is helpful.
    # Named returns are only really a problem when used in conjunction with
    # a bare return statement. I _think_ Revive's bare-return covers that
    # case.
    "nonamedreturns",

    "paralleltest",
    "prealloc",

    # We have very few structs with multiple tags and for the couple we had, this
    # actually made it harder to read.
    "tagalign",

    # Deprecated since golangci-lint 1.64.0. The usetesting linter replaces it.
    "tenv",

    # We probably _should_ be doing this!
    "thelper",

    # We don't follow this. Sometimes we test internal code.
    "testpackage",

    "varnamelen",

    # This would probably be good, but we would need to configure it.
    "wsl",
]

# Please note that we only use depguard for blocking packages and
# gomodguard for blocking modules.
[[linters-settings.depguard.rules.main.deny]]
pkg = "github.com/likexian/gokit/assert"
desc = "Use github.com/stretchr/testify/assert"

[[linters-settings.depguard.rules.main.deny]]
pkg = "golang.org/x/exp/maps"
desc = "Use maps instead."

[[linters-settings.depguard.rules.main.deny]]
pkg = "golang.org/x/exp/slices"
desc = "Use slices instead."

[[linters-settings.depguard.rules.main.deny]]
pkg = "golang.org/x/exp/slog"
desc = "Use log/slog instead."

[[linters-settings.depguard.rules.main.deny]]
pkg = "google.golang.org/api/compute/v1"
desc = "Use cloud.google.com/go/compute/apiv1 instead."

[[linters-settings.depguard.rules.main.deny]]
pkg = "google.golang.org/api/cloudresourcemanager/v1"
desc = "Use cloud.google.com/go/resourcemanager/apiv3 instead."

[[linters-settings.depguard.rules.main.deny]]
pkg = "google.golang.org/api/serviceusage/v1"
desc = "Use cloud.google.com/go/serviceusage/apiv1 instead."

[[linters-settings.depguard.rules.main.deny]]
pkg = "io/ioutil"
desc = "Deprecated. Functions have been moved elsewhere."

[[linters-settings.depguard.rules.main.deny]]
pkg = "k8s.io/utils/strings/slices"
desc = "Use slices"

[[linters-settings.depguard.rules.main.deny]]
pkg = "math/rand$"
desc = "Use math/rand/v2 or crypto/rand as appropriate."

[[linters-settings.depguard.rules.main.deny]]
# slices has better alternatives.
pkg = "sort"
desc = "Use slices instead"

[linters-settings.errcheck]
# Don't allow setting of error to the blank identifier. If there is a legitimate
# reason, there should be a nolint with an explanation.
check-blank = true

exclude-functions = [
    # If we are rolling back a transaction, we are often already in an error
    # state.
    '(*database/sql.Tx).Rollback',

    # It is reasonable to ignore errors if Cleanup fails in most cases.
    '(*github.com/google/renameio/v2.PendingFile).Cleanup',

    # We often do not care if unlocking failed as we are exiting anyway.
    '(*github.com/gofrs/flock.Flock).Unlock',

    # We often don't care if removing a file failed (e.g., it doesn't exist)
    'os.Remove',
    'os.RemoveAll',
]

# This is a workaround for https://github.com/golangci/golangci-lint/issues/4733
ignore = ""

[linters-settings.errorlint]
errorf = true
asserts = true
comparison = true

[linters-settings.exhaustive]
default-signifies-exhaustive = true

[linters-settings.forbidigo]
# Forbid the following identifiers
forbid = [
    { p = "Geoip", msg = "you should use the `GeoIP` qualifier instead" },
    { p = "geoIP", msg = "you should use the `geoip` qualifier instead" },
    { p = "^hubSpot", msg = "you should use the `hubspot` qualifier instead" },
    { p = "Maxmind", msg = "you should use the `MaxMind` qualifier instead" },
    { p = "^maxMind", msg = "you should use the `maxmind` qualifier instead" },
    { p = "Minfraud", msg = "you should use the `MinFraud` qualifier instead" },
    { p = "^minFraud", msg = "you should use the `minfraud` qualifier instead" },
    { p = "[Uu]ser[iI][dD]", msg = "you should use the `accountID` or the `AccountID` qualifier instead" },
    { p = "WithEnterpriseURLs", msg = "Use ghe.NewClient instead." },
    { p = "^bigquery.NewClient", msg = "you should use mmgcloud.NewBigQueryClient instead." },
    { p = "^drive.NewService", msg = "you should use mmgdrive.NewGDrive instead." },
    { p = "^errors.Join", msg = "you should use mmerrors.Join instead." },
    { p = "^errors.New", msg = "you should use mmerrors.New instead." },
    { p = "^filepath.Walk$", msg = "you should use filepath.WalkDir instead as it doesn't call os.Lstat on every entry." },
    { p = "^fmt.Errorf", msg = "you should use mmerrors.Errorf instead." },
    { p = "^math.Max$", msg = "you should use the max built-in instead." },
    { p = "^math.Min$", msg = "you should use the min built-in instead." },
    { p = "^mux.Vars$", msg = "use req.PathValue instead." },
    { p = "^net.ParseCIDR", msg = "you should use netip.ParsePrefix unless you really need a *net.IPNet" },
    { p = "^net.ParseIP", msg = "you should use netip.ParseAddr unless you really need a net.IP" },
    { p = "^pgtype.NewMap", msg = "you should use mmdatabase.NewTypeMap instead" },
    { p = "^sheets.NewService", msg = "you should use mmgcloud.NewSheetsService instead." },
    { p = "^storage.NewClient", msg = "you should use gstorage.NewClient instead. This sets the HTTP client settings that we need for internal use." },
    { p = "^os.IsNotExist", msg = "As per their docs, new code should use errors.Is(err, fs.ErrNotExist)." },
    { p = "^os.IsExist", msg = "As per their docs, new code should use errors.Is(err, fs.ErrExist)" },
    { p = "^net.LookupIP", msg = "You should use net.Resolver functions instead." },
    { p = "^net.LookupCNAME", msg = "You should use net.Resolver functions instead." },
    { p = "^net.LookupHost", msg = "You should use net.Resolver functions instead." },
    { p = "^net.LookupPort", msg = "You should use net.Resolver functions instead." },
    { p = "^net.LookupTXT", msg = "You should use net.Resolver functions instead." },
    { p = "^net.LookupAddr", msg = "You should use net.Resolver functions instead." },
    { p = "^net.LookupMX", msg = "You should use net.Resolver functions instead." },
    { p = "^net.LookupNS", msg = "You should use net.Resolver functions instead." },
    { p = "^net.LookupSRV", msg = "You should use net.Resolver functions instead." },
]

[linters-settings.gci]
sections = ["standard", "default", "prefix(github.maxmind.com/maxmind/mm_website)"]

[linters-settings.gocritic]
enable-all = true
disabled-checks = [
    # Revive's defer rule already captures this. This caught no extra cases.
    "deferInLoop",
    # Given that all of our code runs on Linux and the / separate should
    # work fine, this seems less important.
    "filepathJoin",
    # This seems like it could be good, but we would need to update current
    # uses. It supports "--fix", but the fixing is a bit broken.
    "httpNoBody",
    # This might be good, but we would have to revisit a lot of code.
    "hugeParam",
    # This might be good, but I don't think we want to encourage
    # significant changes to regexes as we port stuff from Perl.
    "regexpSimplify",
    # This seems like it might also be good, but a lot of existing code
    # fails.
    "sloppyReassign",
    # I am not sure we would want this linter and a lot of existing
    # code fails.
    "unnamedResult",
    # Covered by nolintlint
    "whyNoLint",
]

[linters-settings.gocritic.settings.ruleguard]
rules = "${configDir}/go/dev/gorules/dgryski-semgrep-go.go,${configDir}/go/dev/gorules/maxmind.go"
# fail if there are any errors parsing the rules.
failOn = "all"

[linters-settings.gofumpt]
extra-rules = true

# IMPORTANT: gomodguard blocks _modules_, not arbitrary packages. Be
# sure to use the module path from the go.mod file for these.
# See https://github.com/ryancurrah/gomodguard/issues/12
[linters-settings.gomodguard]
[[linters-settings.gomodguard.blocked.modules]]
[linters-settings.gomodguard.blocked.modules."github.com/avct/uasurfer"]
recommendations = ["github.com/xavivars/uasurfer"]
reason = "The original avct module appears abandoned."

[[linters-settings.gomodguard.blocked.modules]]
[linters-settings.gomodguard.blocked.modules."github.com/BurntSushi/toml"]
recommendations = ["github.com/pelletier/go-toml/v2"]
reason = "This library panics frequently on invalid input."

[[linters-settings.gomodguard.blocked.modules]]
[linters-settings.gomodguard.blocked.modules."github.com/pelletier/go-toml"]
recommendations = ["github.com/pelletier/go-toml/v2"]
reason = "This is an outdated version."

[[linters-settings.gomodguard.blocked.modules]]
[linters-settings.gomodguard.blocked.modules."github.com/gofrs/uuid"]
recommendations = ["github.maxmind.com/maxmind/mm_website/go/pkg/uuid"]

[[linters-settings.gomodguard.blocked.modules]]
[linters-settings.gomodguard.blocked.modules."github.com/gofrs/uuid/v5"]
recommendations = ["github.maxmind.com/maxmind/mm_website/go/pkg/uuid"]

[[linters-settings.gomodguard.blocked.modules]]
[linters-settings.gomodguard.blocked.modules."github.com/satori/go.uuid"]
recommendations = ["github.maxmind.com/maxmind/mm_website/go/pkg/uuid"]

[[linters-settings.gomodguard.blocked.modules]]
[linters-settings.gomodguard.blocked.modules."github.com/google/uuid"]
recommendations = ["github.maxmind.com/maxmind/mm_website/go/pkg/uuid"]

[[linters-settings.gomodguard.blocked.modules]]
[linters-settings.gomodguard.blocked.modules."github.com/lib/pq"]
recommendations = ["github.com/jackc/pgx"]
reason = "This library is no longer actively maintained."

[[linters-settings.gomodguard.blocked.modules]]
[linters-settings.gomodguard.blocked.modules."github.com/neilotoole/errgroup"]
recommendations = ["golang.org/x/sync/errgroup"]
reason = "This library can lead to subtle deadlocks in certain use cases."

[[linters-settings.gomodguard.blocked.modules]]
[linters-settings.gomodguard.blocked.modules."github.com/pariz/gountries"]
reason = "This library's data is not actively maintained. Use GeoInfo data."

[linters-settings.gomodguard.blocked.modules."github.com/pkg/errors"]
recommendations = ["github.maxmind.com/maxmind/mm_website/go/pkg/mmerrors"]
reason = "pkg/errors is no longer maintained."

[[linters-settings.gomodguard.blocked.modules]]
[linters-settings.gomodguard.blocked.modules."github.com/RackSec/srslog"]
recommendations = ["log/syslog"]
reason = "This library's data is not actively maintained."

[[linters-settings.gomodguard.blocked.modules]]
[linters-settings.gomodguard.blocked.modules."github.com/ua-parser/uap-go"]
recommendations = ["github.com/xavivars/uasurfer"]
reason = "The performance of this library is absolutely abysmal."

[[linters-settings.gomodguard.blocked.modules]]
[linters-settings.gomodguard.blocked.modules."github.com/ugorji/go"]
recommendations = ["encoding/json", "github.com/mailru/easyjson"]
reason = "This library is poorly maintained. We should default to using encoding/json and use easyjson where performance really matters."

[[linters-settings.gomodguard.blocked.modules]]
[linters-settings.gomodguard.blocked.modules."github.com/zeebo/assert"]
recommendations = ["github.com/stretchr/testify/assert"]
reason = "Use github.com/stretchr/testify/assert"

[[linters-settings.gomodguard.blocked.modules]]
[linters-settings.gomodguard.blocked.modules."gotest.tools/v3"]
recommendations = ["github.com/stretchr/testify/assert"]
reason = "Use github.com/stretchr/testify/assert"

[[linters-settings.gomodguard.blocked.modules]]
[linters-settings.gomodguard.blocked.modules."inet.af/netaddr"]
recommendations = ["net/netip", "go4.org/netipx"]
reason = "inet.af/netaddr has been deprecated."

[[linters-settings.gomodguard.blocked.versions]]
[linters-settings.gomodguard.blocked.versions."github.com/jackc/pgconn"]
reason = "Use github.com/jackc/pgx/v5"

[[linters-settings.gomodguard.blocked.versions]]
[linters-settings.gomodguard.blocked.versions."github.com/jackc/pgtype"]
reason = "Use github.com/jackc/pgx/v5"

[[linters-settings.gomodguard.blocked.versions]]
[linters-settings.gomodguard.blocked.versions."github.com/jackc/pgx"]
version = "< 5.0.0"
reason = "Use github.com/jackc/pgx/v5"

[linters-settings.gosec]
excludes = [
    # G104 - "Audit errors not checked." We use errcheck for this.
    "G104",

    # G306 - "Expect WriteFile permissions to be 0600 or less".
    "G306",

    # Prohibits defer (*os.File).Close, which we allow when reading from file.
    "G307",

    # no longer relevant with 1.22
    "G601",
]

[linters-settings.govet]
"enable-all" = true

#  Although it is very useful in particular cases where we are trying to
# use as little memory as possible, there are even more cases where
# other organizations may make more sense.
disable = ["fieldalignment"]

[linters-settings.govet.settings.shadow]
strict = true

[linters-settings.misspell]
locale = "US"

[[linters-settings.misspell.extra-words]]
typo = "marshall"
correction = "marshal"

[[linters-settings.misspell.extra-words]]
typo = "marshalling"
correction = "marshaling"

[[linters-settings.misspell.extra-words]]
typo = "marshalls"
correction = "marshals"

[[linters-settings.misspell.extra-words]]
typo = "unmarshall"
correction = "unmarshal"

[[linters-settings.misspell.extra-words]]
typo = "unmarshalling"
correction = "unmarshaling"

[[linters-settings.misspell.extra-words]]
typo = "unmarshalls"
correction = "unmarshals"

[linters-settings.nolintlint]
allow-unused = false
allow-no-explanation = ["misspell"]
require-explanation = true
require-specific = true

[linters-settings.revive]
enable-all-rules = true
ignore-generated-header = true
severity = "warning"

# This might be nice but it is so common that it is hard
# to enable.
[[linters-settings.revive.rules]]
name = "add-constant"
disabled = true

[[linters-settings.revive.rules]]
name = "argument-limit"
disabled = true

[[linters-settings.revive.rules]]
name = "cognitive-complexity"
disabled = true

[[linters-settings.revive.rules]]
name = "comment-spacings"
arguments = ["easyjson", "nolint"]
disabled = false

# Probably a good rule, but we have a lot of names that
# only have case differences.
[[linters-settings.revive.rules]]
name = "confusing-naming"
disabled = true

[[linters-settings.revive.rules]]
name = "cyclomatic"
disabled = true

# Although being consistent might be nice, I don't know that it
# is worth the effort enabling this rule. It doesn't have an
# autofix option.
[[linters-settings.revive.rules]]
name = "enforce-repeated-arg-type-style"
arguments = ["short"]
disabled = true

[[linters-settings.revive.rules]]
name = "enforce-map-style"
arguments = ["literal"]
disabled = false

# We have very few of these as we force nil slices in most places,
# but there are a couple of cases.
[[linters-settings.revive.rules]]
name = "enforce-slice-style"
arguments = ["literal"]
disabled = false

[[linters-settings.revive.rules]]
name = "file-header"
disabled = true

# We have a lot of flag parameters. This linter probably makes
# a good point, but we would need some cleanup or a lot of nolints.
[[linters-settings.revive.rules]]
name = "flag-parameter"
disabled = true

[[linters-settings.revive.rules]]
name = "function-length"
disabled = true

[[linters-settings.revive.rules]]
name = "function-result-limit"
disabled = true

[[linters-settings.revive.rules]]
name = "line-length-limit"
disabled = true

[[linters-settings.revive.rules]]
name = "max-public-structs"
disabled = true

# We frequently use nested structs, particularly in tests.
[[linters-settings.revive.rules]]
name = "nested-structs"
disabled = true

# This doesn't make sense with 1.22 loop var changes.
[[linters-settings.revive.rules]]
name = "range-val-address"
disabled = true

# This flags things that do not seem like a problem, e.g. "sixHours".
[[linters-settings.revive.rules]]
name = "time-naming"
disabled = true

# This causes a ton of failures. Many are fairly safe. It might be nice to
# enable, but probably not worth the effort.
[[linters-settings.revive.rules]]
name = "unchecked-type-assertion"
disabled = true

# This seems to give many false positives.
[[linters-settings.revive.rules]]
name = "unconditional-recursion"
disabled = true

# This is covered elsewhere and we want to ignore some
# functions such as fmt.Fprintf.
[[linters-settings.revive.rules]]
name = "unhandled-error"
disabled = true

# We generally have unused receivers in tests for meeting the
# requirements of an interface.
[[linters-settings.revive.rules]]
name = "unused-receiver"
disabled = true

[linters-settings.staticcheck]
checks = [
    "all",
    # SA1019: Using a deprecated function, variable, constant or field
    #
    # This is disabled as it interacts poorly with golangci-lint's caching.
    # I believe https://github.com/golangci/golangci-lint-action/issues/420
    # is the same underlying issue.
    "-SA1019",
    # SA5008: unknown JSON option "intern" - easyjson specific option.
    "-SA5008",
]

[linters-settings.tagliatelle.case.rules]
avro = "snake"
bson = "snake"
env = "upperSnake"
envconfig = "upperSnake"
json = "snake"
mapstructure = "snake"
xml = "snake"
yaml = "snake"

[linters-settings.unparam]
check-exported = true

[linters-settings.wrapcheck]
"ignoreSigs" = [
    ".Errorf(",
    "errgroup.NewMultiError(",
    "mmerrors.Join(",
    "mmerrors.New(",
    ".Wait(",
    ".WithStack(",
    ".Wrap(",
    ".Wrapf(",
    "v5.Retry[T any](",
]

[issues]
exclude-use-default = false

exclude-dirs = [
    "geoip-build/mmcsv",
]

exclude-files = [
    "_easyjson\\.go$",
    "_easyjson_test\\.go$",
    "_xgb2code\\.go$",
    "_json2vector\\.go$",
]

[[issues.exclude-rules]]
linters = [
    "bodyclose",
]
# This rule doesn't really make sense for tests where we don't have an open
# connection and we might be passing around the response for other reasons.
path = "_test.go"

[[issues.exclude-rules]]
linters = [
    "errcheck",
]
# There are many cases where we want to just close resources and ignore the
# error (e.g., for defer f.Close on a read). errcheck removed its built-in
# wildcard ignore. I tried listing all of the cases, but it was too many
# and some were very specific.
source = "\\.Close"

[[issues.exclude-rules]]
linters = [
    "forbidigo",
]
# This refers to a minFraud field, not the MaxMind Account ID
source = "AccountUserID|Account\\.UserID"

# we include both a source and text exclusion as the source exclusion
# misses matches where forbidigo reports the error on the first line
# of a chunk of a function call even though the use is on a later line.
[[issues.exclude-rules]]
linters = [
    "forbidigo",
]
text = "AccountUserID|Account\\.UserID"

[[issues.exclude-rules]]
linters = [
    "gocritic",
]
# For some reason the imports stuff in ruleguard doesn't work in golangci-lint.
# Perhaps it has an outdated version or something
path = "_test.go"
text = "ruleguard: Prefer the alternative Context method instead"

[[issues.exclude-rules]]
linters = [
    "gocritic",
]
# The nolintlint linter behaves oddly with ruleguard rules
source = "// *no-ruleguard"

[[issues.exclude-rules]]
linters = [
    "nolintlint",
]
# The contextcheck linter also uses "nolint" in a slightly different way,
# leading to falso positives from nolintlint.
source = "//nolint:contextcheck //.*"

[[issues.exclude-rules]]
linters = [
    "govet",
]
# These are usually fine to shadow and not allowing shadowing for them can
# make the code unnecessarily verbose.
text = 'shadow: declaration of "(ctx|err|ok)" shadows declaration'

[[issues.exclude-rules]]
linters = [
    "contextcheck",
    # With recent changes to the linter, there were a lot of failures in
    # the tests and it wasn't clear to me that fixing them would actually
    # improve the readability.
    "goconst",
    "nilerr",
    "wrapcheck",
]
path = "_test.go"

[[issues.exclude-rules]]
linters = [
    "stylecheck",
]
# ST1016 - methods on the same type should have the same receiver name.
#    easyjson doesn't interact well with this.
text = "ST1016"

[[issues.exclude-rules]]
linters = [
    "wrapcheck",
]
text = "github.maxmind.com/maxmind/mm_website/go"

[[issues.exclude-rules]]
linters = [
    "wrapcheck",
]
path = "_easyjson.go"

[[issues.exclude-rules]]
linters = [
    "gocritic",
]
source = "Chmod|WriteFile"
text = "octalLiteral"
go version && go env
$ go version && go env
go version go1.23.6 linux/amd64
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/wstorey_maxmind_com/.cache/go-build'
GOENV='/home/wstorey_maxmind_com/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/wstorey_maxmind_com/go/pkg/mod'
GONOPROXY=''
GONOSUMDB='github.maxmind.com/*'
GOOS='linux'
GOPATH='/home/wstorey_maxmind_com/go'
GOPRIVATE=''
GOPROXY='https://artifactory.maxmind.com/artifactory/api/go/go/'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.23.6'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/home/wstorey_maxmind_com/.config/go/telemetry'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/wstorey_maxmind_com/mm_website/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build1627781509=/tmp/go-build -gno-record-gcc-switches'
golangci-lint cache clean
golangci-lint run -v
$ golangci-lint cache clean
golangci-lint run -v
INFO golangci-lint has version 1.61.0 built with go1.23.1 from a1d6c560 on 2024-09-09T17:44:42Z
INFO [config_reader] Config search paths: [./ /home/wstorey_maxmind_com/mm_website /home/wstorey_maxmind_com /home /]
INFO [config_reader] Used config file .golangci.toml
WARN The linter 'exportloopref' is deprecated (since v1.60.2) due to: Since Go1.22 (loopvar) this linter is no longer relevant. Replaced by copyloopvar.
WARN The linter 'gomnd' is deprecated (since v1.58.0) due to: The linter has been renamed. Replaced by mnd.
WARN The linter 'execinquery' is deprecated (since v1.58.0) due to: The repository of the linter has been archived by the owner.
INFO [lintersdb] Active 74 linters: [asasalint asciicheck bidichk bodyclose containedctx contextcheck copyloopvar decorder depguard durationcheck errcheck errchkjson errname errorlint execinquery exhaustive exportloopref fatcontext forbidigo gci ginkgolinter gocheckcompilerdirectives goconst gocritic gocyclo godot gofmt gofumpt goheader goimports gomnd gomoddirectives gomodguard goprintffuncname gosec gosimple govet grouper importas ineffassign interfacebloat intrange makezero mirror misspell nakedret nilerr noctx nolintlint nosprintfhostport perfsprint predeclared promlinter protogetter reassign revive rowserrcheck sloglint spancheck sqlclosecheck staticcheck stylecheck tagliatelle testableexamples testifylint tparallel unconvert unparam unused usestdlibvars wastedassign whitespace wrapcheck zerologlint]
INFO [loader] Go packages loading at mode 575 (types_sizes|compiled_files|exports_file|imports|name|deps|files) took 2.970202048s
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 718.121223ms
INFO [linters_context] importas settings found, but no aliases listed. List aliases under alias: key.
INFO [linters_context/goanalysis] analyzers took 2h9m39.502790698s with top 10 stages: gocritic: 1h30m11.0410094s, buildir: 14m43.096838464s, wastedassign: 4m52.161138603s, buildssa: 2m39.538454177s, the_only_name: 1m50.867483795s, bidichk: 1m50.548020526s, gosec: 1m12.659183467s, unparam: 40.505447028s, exhaustive: 30.3034051s, forbidigo: 29.4338938s
INFO [runner/skip_dirs] Skipped 20 issues from dir go/pkg/geoip-build/mmcsv by pattern geoip-build/mmcsv
WARN [runner/nolint] Found unknown linters in //nolint directives: exptostd, recvcheck
INFO [runner/max_same_issues] 123/126 issues with text "Magic number: 5, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 111/114 issues with text "Magic number: 2, in <condition> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 82/85 issues with text "Magic number: 3, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 78/81 issues with text "Magic number: 2, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 77/80 issues with text "ruleguard: When wrapping errors, describe what was being done. Do not repeat that it failed." were hidden, use --max-same-issues
INFO [runner/max_same_issues] 59/62 issues with text "Use ExecContext instead of QueryContext to execute `WITH` query" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 55/58 issues with text "Magic number: 4, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 50/53 issues with text "Magic number: 10, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 44/47 issues with text "Magic number: 255, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 42/45 issues with text "Magic number: 100, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 40/43 issues with text "Magic number: 30, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 37/40 issues with text "Use ExecContext instead of QueryRowContext to execute `WITH` query" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 36/39 issues with text "Magic number: 0o644, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 35/38 issues with text "ruleguard: SQL should not be concatenated or used in a format, use prepared statements. If you must generate a query, do it during initialization." were hidden, use --max-same-issues
INFO [runner/max_same_issues] 35/38 issues with text "Magic number: 24, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 34/37 issues with text "Magic number: 3, in <condition> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 29/32 issues with text "Magic number: 50, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 28/31 issues with text "Magic number: 0o750, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 25/28 issues with text "Magic number: 2, in <operation> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 25/28 issues with text "Magic number: 6, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 22/25 issues with text "ruleguard: use mmflag.EnvOrValue instead of Getenv or LookupEnv" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 19/22 issues with text "Magic number: 24, in <operation> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 18/21 issues with text "Magic number: 30, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 17/20 issues with text "Magic number: 5, in <condition> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 16/19 issues with text "Magic number: 20, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 15/18 issues with text "Magic number: 4, in <condition> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 15/18 issues with text "Magic number: 5, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 14/17 issues with text "Magic number: 0.01, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 12/15 issues with text "Magic number: 1000, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 11/14 issues with text "ruleguard: Prefer the alternative Context method instead" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 11/14 issues with text "Magic number: 100, in <operation> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 11/14 issues with text "Magic number: 10, in <condition> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 11/14 issues with text "Magic number: 24, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 10/13 issues with text "Magic number: 7, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 9/12 issues with text "Magic number: 10, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 8/11 issues with text "Magic number: 0.01, in <return> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 8/11 issues with text "Magic number: 180, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 8/11 issues with text "Magic number: 6, in <condition> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 8/11 issues with text "Magic number: 2, in <return> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 8/11 issues with text "Magic number: 5906, in <condition> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 7/10 issues with text "Magic number: 28, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 7/10 issues with text "Magic number: 100, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 7/10 issues with text "Magic number: 6, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 7/10 issues with text "Magic number: 100, in <condition> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 7/10 issues with text "Magic number: 64956, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 7/10 issues with text "Magic number: 0.01, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 6/9 issues with text "Magic number: 100, in <return> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 6/9 issues with text "Magic number: 42, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 6/9 issues with text "Magic number: 8, in <condition> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 6/9 issues with text "Magic number: 200, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 6/9 issues with text "Magic number: 0.5, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 6/9 issues with text "Magic number: 0o600, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 5/8 issues with text "Magic number: 50, in <condition> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 5/8 issues with text "Magic number: 8, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 5/8 issues with text "Magic number: 3, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 5/8 issues with text "Magic number: 0.02, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 5/8 issues with text "Magic number: 100000, in <condition> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 5/8 issues with text "Magic number: 0.01, in <condition> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 5/8 issues with text "Magic number: 2, in <case> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 5/8 issues with text "Magic number: 10_000, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 5/8 issues with text "Use ExecContext instead of QueryRowContext to execute `UPDATE` query" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 4/7 issues with text "Magic number: 12, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 4/7 issues with text "Magic number: 1024, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 4/7 issues with text "Magic number: 500, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 4/7 issues with text "Magic number: 64, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 4/7 issues with text "Magic number: 99.0, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 4/7 issues with text "Use ExecContext instead of QueryRowContext to execute `INSERT` query" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 4/7 issues with text "Magic number: 60, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 4/7 issues with text "Magic number: 10, in <operation> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 4/7 issues with text "Magic number: 6252001.0, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 4/7 issues with text "Magic number: 3, in <case> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 3/6 issues with text "Magic number: 0.99, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 3/6 issues with text "Magic number: 4, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 3/6 issues with text "Magic number: 2.0, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 3/6 issues with text "Magic number: 254, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 3/6 issues with text "Magic number: 0.5, in <return> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 3/6 issues with text "Magic number: 2048, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 3/6 issues with text "Magic number: 3, in <operation> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 2/5 issues with text "Magic number: 0.27, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 2/5 issues with text "Magic number: 20, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 2/5 issues with text "Magic number: 15, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 2/5 issues with text "Magic number: 5000, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 2/5 issues with text "unused-parameter: parameter 'tx' seems to be unused, consider removing or renaming it as _" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 2/5 issues with text "Magic number: 77237, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 2/5 issues with text "Magic number: 0o640, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 2/5 issues with text "Magic number: 0.8, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 2/5 issues with text "Magic number: 4, in <case> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 2/5 issues with text "Magic number: 0.001, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 2/5 issues with text "Magic number: 0.1, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 2/5 issues with text "Magic number: 0.03, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 2/5 issues with text "Magic number: 7, in <condition> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 2/5 issues with text "Magic number: 32, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 2/5 issues with text "Magic number: 2, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 2/5 issues with text "Magic number: 40, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 6, in <case> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Use ExecContext instead of QueryRowContext to execute `CALL` query" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 15, in <operation> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "error returned from external package is unwrapped: sig: func strconv.Atoi(s string) (int, error)" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 42.4567, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 20, in <condition> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 30, in <condition> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 0.1, in <condition> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 5280.0, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "package-comments: should have a package comment" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 6255149.0, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 25, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 4, in <operation> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 11.0, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 22.5, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 99255, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 0.2, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 16, in <argument> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 0.25, in <operation> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 10, in <case> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "error returned from external package is unwrapped: sig: func (*database/sql.Rows).Err() error" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 2635167.0, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 0.1, in <return> detected" were hidden, use --max-same-issues
INFO [runner/max_same_issues] 1/4 issues with text "Magic number: 96, in <assign> detected" were hidden, use --max-same-issues
INFO [runner/max_from_linter] 995/1045 issues from linter gomnd were hidden, use --max-issues-per-linter
INFO [runner] Issues before processing: 132621, after processing: 130
INFO [runner] Processors filtering stat (in/out): invalid_issue: 132621/132621, skip_files: 132621/15639, uniq_by_line: 2805/2661, severity-rules: 130/130, cgo: 132621/132621, max_same_issues: 2661/1125, source_code: 130/130, max_per_file_from_linter: 2661/2661, exclude: 14900/14900, exclude-rules: 14900/5934, nolint: 5934/2805, path_shortener: 130/130, skip_dirs: 15639/15619, path_prettifier: 132621/132621, autogenerated_exclude: 15619/14900, identifier_marker: 14900/14900, diff: 2661/2661, max_from_linter: 1125/130, fixer: 130/130, path_prefixer: 130/130, filename_unadjuster: 132621/132621, sort_results: 130/130
INFO [runner] processing took 1.366019818s with stages: nolint: 541.207698ms, identifier_marker: 326.93144ms, exclude-rules: 210.999324ms, path_prettifier: 110.572048ms, skip_files: 52.043585ms, autogenerated_exclude: 45.391619ms, invalid_issue: 24.906479ms, cgo: 18.681223ms, filename_unadjuster: 18.164119ms, skip_dirs: 13.946543ms, max_same_issues: 1.711602ms, uniq_by_line: 723.495µs, source_code: 443.555µs, max_per_file_from_linter: 150.141µs, max_from_linter: 106.389µs, path_shortener: 38.421µs, fixer: 534ns, sort_results: 502ns, exclude: 436ns, diff: 322ns, severity-rules: 227ns, path_prefixer: 116ns
INFO [runner] linters took 1m52.59059132s with stages: goanalysis_metalinter: 1m51.224426034s

[snip lines showing parts of my code due to lints, sorry]

INFO File cache stats: 4215 entries of total size 38.6MiB
INFO Memory: 1115 samples, avg is 18764.6MB, max is 27448.4MB
INFO Execution took 1m56.299039042s
1

@ldez ldez added bug Something isn't working area: nolint Related to nolint directive and nolintlint and removed bug Something isn't working area: nolint Related to nolint directive and nolintlint labels Feb 12, 2025
@ldez
Copy link
Member

ldez commented Apr 8, 2025

Related to #3228 (comment)

@ldez
Copy link
Member

ldez commented Apr 9, 2025

mgechev/revive#1306

@ccoVeille
Copy link
Contributor

Thanks again for fixing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: nolint Related to nolint directive and nolintlint bug Something isn't working
Projects
None yet
4 participants