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

support project-level golangci-lint linting #3074

Closed

Conversation

JeanMertz
Copy link
Contributor

The new g:ale_go_golangci_lint_scope option supersedes g:ale_go_golangci_lint_package and supports three different modes:

  • file
  • module
  • project

The default is file, and means golangci-lint lints the current file.

The module option inherits the behavior previously provided by g:ale_go_golangci_lint_package.

The new option project searches for the root of the Go project (either with a "go.mod" file, a ".git" directory, or within $GOPATH) and runs the linter from there.

This is helpful in cases such as #2339 where the unused lint will report errors if it runs against a module or file, as opposed to from the project root.

The new `g:ale_go_golangci_lint_scope` option replaces
`g:ale_go_golangci_lint_package` and supports three different modes:

* file
* module
* project

The default is `file`, and means `golangci-lint` lints the current file.

The `module` option inherits the behavior previously provided by
`g:ale_go_golangci_lint_package`. The

The new option `project` searches for the root of the Go project (either
with a "go.mod" file, a ".git" directory, or within $GOPATH) and runs
the linter from there.
@JeanMertz
Copy link
Contributor Author

I'm not sure yet why the CI is failing.

Locally, the tests are passing (./run-tests), but both CI environments have the same test failing (related to creating a temporary .git directory). Could there be some race condition w.r.t. parallel tests?

@stale
Copy link

stale bot commented Aug 13, 2020

This pull request has been automatically marked as stale because it has not been updated recently. Make sure to write tests and document your changes. See :help ale-dev for information on writing tests.
If your pull request is good to merge, bother w0rp or another maintainer again, and get them to merge it.

@stale stale bot added the stale PRs a bot will close automatically label Aug 13, 2020
@stale stale bot closed this Aug 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PRs a bot will close automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant