Skip to content

Directory and path to go file can not specify as target at the same time in spite of the description in README #942

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
3 tasks done
mpls104 opened this issue Jan 25, 2020 · 1 comment · Fixed by #4566
Closed
3 tasks done
Labels
stale No recent correspondence or work activity

Comments

@mpls104
Copy link

mpls104 commented Jan 25, 2020

Readme says that it is possible to specify directory and file path at the same time but it fails.

Thank you for creating the issue!

  • 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).

Please include the following information:

Version of golangci-lint
$ docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.23.1 golangci-lint run --version
# golangci-lint has version 1.23.1 built from 567904e on 2020-01-20T08:00:15Z
Config file
no config file
Go environment
According to Docker image
Verbose output of running
$ docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.23.1 golangci-lint run dir1 dir2/... dir3/file1.go -v` 
level=info msg="[config_reader] Config search paths: [./ /app/dir1 /app /]"
level=info msg="[lintersdb] Active 10 linters: [deadcode errcheck gosimple govet ineffassign staticcheck structcheck typecheck unused varcheck]"
level=info msg="[lintersdb] Active 10 linters: [deadcode errcheck gosimple govet ineffassign staticcheck structcheck typecheck unused varcheck]"
level=info msg="[loader] Go packages loading at mode 575 (compiled_files|deps|exports_file|files|name|imports|types_sizes) took 25.5212ms"
level=error msg="Running error: context loading failed: failed to load program with go/packages: -: named files must be .go files: ./dir1"
level=info msg="Memory: 2 samples, avg is 69.2MB, max is 69.2MB"
level=info msg="Execution took 33.7025ms"

It seems that combination of directory and file causes problem.

@stale
Copy link

stale bot commented Jan 25, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale No recent correspondence or work activity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant