Skip to content

Golangci-lint @ v2 #3707

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

Open
bernot-dev opened this issue Mar 24, 2025 · 3 comments · May be fixed by #3710
Open

Golangci-lint @ v2 #3707

bernot-dev opened this issue Mar 24, 2025 · 3 comments · May be fixed by #3710

Comments

@bernot-dev
Copy link

Currently, vim-go supports golangci-lint@v1. golangci-lint@v2 was recently released.

This issue requests support for golangci-lint@v2.

@bernot-dev
Copy link
Author

bernot-dev commented Mar 24, 2025

Key issues to address:

  1. Install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest instead of v1.
  2. Replace --print-issued-lines=false with --output.text.print-issued-lines=false.
  3. Remove --exclude-use-default=false as this is now the default behavior.
  4. Fix file paths. File paths are now relative to the .golangci.yml config file by default, typically at the project root. Current behavior results in duplicating the path. For example <root>/pkg/foo/bar.go >> <root>/pkg/foo/pkg/foo/bar.go.

@alcortesm
Copy link

alcortesm commented Mar 25, 2025

golangci-lint v2 now has a new golangci-lint fmt command, it would be cool to be able to use it for formatting operations, sorting imports...

Overview of v2: https://ldez.github.io/blog/2025/03/23/golangci-lint-v2/

@bhcleek bhcleek added this to the vim-go v1.29 milestone Apr 5, 2025
@bhcleek
Copy link
Collaborator

bhcleek commented Apr 5, 2025

I've started this work.

bhcleek added a commit to bhcleek/vim-go that referenced this issue Apr 6, 2025
@bhcleek bhcleek linked a pull request Apr 6, 2025 that will close this issue
@bhcleek bhcleek removed this from the vim-go v1.29 milestone Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants