Skip to content
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

GoLint only operates on the current file. #1263

Closed
alercah opened this issue Apr 16, 2017 · 2 comments
Closed

GoLint only operates on the current file. #1263

alercah opened this issue Apr 16, 2017 · 2 comments

Comments

@alercah
Copy link

alercah commented Apr 16, 2017

Behavior

When GoLint is run with no arguments, it only lints the current file rather than the entire package, as GoBuild and GoTest do.

Steps to reproduce:

  1. Create a package with two files a.go and b.go. Both should build and a.go should have a lint error.
  2. Open b.go.
  3. Run GoLint.
  4. Observe no errors reported.
  5. Run GoLint path/to/package.
  6. Observe an error reported in a.go

Configuration

Vim 8.0
vim-go 1.11
Go 1.7.4

@fatih
Copy link
Owner

fatih commented May 7, 2017

Hi @alercah

The feature was added recently (2 months ago) to golint. One of the reasons it's per file is that golint only could do it on a single file. Here is the recent change to it: golang/lint#271
I'm labeling this as help-wanted. If I have time I'll do it, if not someone else can tackle it. /cc @bhcleek

@fatih
Copy link
Owner

fatih commented May 22, 2017

:GoLint now works on the current directory instead of the file. Please pull the latest master. Thanks and feel free to open another issue if there are problems.

@fatih fatih closed this as completed May 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants