You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With "revive" linter enabled, the checkers for "exported" and "package-comments" do not work. When running the standalone linter, same version, on the same source, they work correctly.
The problem occurs both with the default "revive" configuration (i.e. no mention of "revive" in "linters-settings"), and with the recommended "revive" configuration (from their github repository).
Running golangci-lint -config .golangci.yml /tmp/sample/a.go does not emit any complaints (with or without the "linters-settings" section).
Running revive /tmp/sample/a.go emits the following output (with or without the recommended configuration from the projects Github page):
/tmp/package/a.go:3:7: exported const Public should have comment or be unexported
/tmp/package/a.go:1:1: should have a package comment
Version of golangci-lint
$ golangci-lint --version
# Paste output heregolangci-lint has version v1.53.3 built with go1.20.7 from (unknown, mod sum: "h1:CUcRafczT4t1F+mvdkUm6KuOpxUZTl0yWN/rSU6sSMo=") on (unknown)
Those reports are ignored by default: EXC0014 and EXC0015.
It was flagged as "Annoying issue about not having a comment. The rare codebase has such comments".
To show the report, you have to disable the default exclusions:
issues:
exclude-use-default: false
or you have to disable this specific exclusion rule:
Welcome
Description of the problem
With "revive" linter enabled, the checkers for "exported" and "package-comments" do not work. When running the standalone linter, same version, on the same source, they work correctly.
The problem occurs both with the default "revive" configuration (i.e. no mention of "revive" in "linters-settings"), and with the recommended "revive" configuration (from their github repository).
Running
golangci-lint -config .golangci.yml /tmp/sample/a.go
does not emit any complaints (with or without the "linters-settings" section).Running
revive /tmp/sample/a.go
emits the following output (with or without the recommended configuration from the projects Github page):Version of golangci-lint
Configuration
Go environment
Verbose output of running
Code example or link to a public repository
Validation
The text was updated successfully, but these errors were encountered: