-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
depguard linter emits alert #3116
Comments
Hello, I am not able to reproduce your problem. .golangci.ymllinters:
disable-all: true
enable:
- typecheck
- depguard
linters-settings:
depguard:
list-type: blacklist
include-go-root: true
packages:
- io/ioutil
- math/rand
- golang.org/x/net/context
- github.com/satori/go.uuid
- gopkg.in/go-playground/assert.v1
- github.com/magiconair/properties/assert
- github.com/globalsign/mgo
- github.com/globalsign/mgo/bson
codepackage main
import (
"fmt"
"github.com/davecgh/go-spew/spew"
)
func main() {
spew.Dump()
fmt.Println("")
} run$ docker run -it --rm -e GOLANGCI_LINT_CACHE=/tmp/.cache \
-v /tmp/.cache_golint:/tmp/.cache \
-v $(pwd):/app \
-w /app \
golangci/golangci-lint:v1.48.0 golangci-lint run -v
INFO [config_reader] Config search paths: [./ /app / /root]
INFO [config_reader] Used config file .golangci.yml
INFO [lintersdb] Active 2 linters: [depguard typecheck]
INFO [loader] Go packages loading at mode 575 (deps|imports|name|compiled_files|exports_file|files|types_sizes) took 220.586703ms
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 70.809µs
INFO [linters context/goanalysis] analyzers took 31.174µs with top 10 stages: depguard: 24.911µs, typecheck: 6.263µs
INFO [runner] processing took 2.276µs with stages: max_same_issues: 356ns, nolint: 277ns, max_from_linter: 169ns, skip_dirs: 156ns, cgo: 138ns, exclude: 138ns, filename_unadjuster: 131ns, autogenerated_exclude: 129ns, path_prettifier: 124ns, skip_files: 123ns, uniq_by_line: 122ns, max_per_file_from_linter: 119ns, path_shortener: 46ns, severity-rules: 40ns, identifier_marker: 37ns, source_code: 37ns, sort_results: 35ns, diff: 35ns, path_prefixer: 33ns, exclude-rules: 31ns
INFO [runner] linters took 20.349801ms with stages: goanalysis_metalinter: 20.327703ms
INFO File cache stats: 0 entries of total size 0B
INFO Memory: 4 samples, avg is 54.5MB, max is 54.5MB
INFO Execution took 245.859459ms |
I am not also able to reproduce my problem with your example. I copy the verbose result with
|
FYI, I produce this problem on my personal dev computer and also on our gitlab ci |
I need something to reproduce it. have you tried |
Is it equivalent to delete the |
yes, it's equivalent. Can you provide your full configuration file? |
In this case, I test it
Unfortunately not. But the difference with the initial provided configuration file is:
I have once. I also tested with
By the way, If I multiple golangci-lint configuration files, I did have the same behavior with v1.37, didn't it? |
I'm confused: you talk about There no change around depguard since a long time https://github.com/OpenPeeDeeP/depguard |
did you have a |
sorry for the typo, I am talking about
No, I didn't I will try to debug on my side, if you have a clue, then don't hesitate to give me. |
Maybe it's related to OpenPeeDeeP/depguard#24, OpenPeeDeeP/depguard#25, and OpenPeeDeeP/depguard#23 |
I remember back that I have already this error sometime with previous error (and it disappears if after clearing cache or restarting computer, I don't remember exactly). |
golangci/golangci-lint:v1.48
docker image, depguard linter emits alertgolangci/golangci-lint#3116 OpenPeeDeeP/depguard#25 Signed-off-by: Luke Shumaker <lukeshu@datawire.io>
This fix, is it embed with v1.50.0? |
You have to test it and validate that. |
OK, as I didn't see this issue into the changelog. |
Welcome
Description of the problem
With
golangci/golangci-lint:v1.48
docker image (works fine withgolangci/golangci-lint:v1.47
docker image), depguard linter emits those alerts:I don't have those errors, when I run
golangci-lint
with binary of course with the same version of docker image (i.e.v1.38
) (fetched by arch package https://aur.archlinux.org/packages/golangci-lint-bin).Of course, I don't put this package into my
.golangci.yml
, plz find the extract for depguard:I run
golangci/golangci-lint:v1.48
docker image within makefile:Version of golangci-lint
v1.48
Configuration file
Go environment
Verbose output of running
Code example or link to a public repository
It is just an import
The text was updated successfully, but these errors were encountered: