From cca226c322da77863edec6b46501884b773c8dfa Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Tue, 8 Apr 2025 23:18:38 +0200 Subject: [PATCH 1/5] docs: update section about vscode integration --- docs/src/docs/welcome/integrations.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/src/docs/welcome/integrations.mdx b/docs/src/docs/welcome/integrations.mdx index 2da993e0242d..8298858933c6 100644 --- a/docs/src/docs/welcome/integrations.mdx +++ b/docs/src/docs/welcome/integrations.mdx @@ -12,15 +12,13 @@ Install [plugin](https://plugins.jetbrains.com/plugin/12496-go-linter). ### Visual Studio Code -The integration for golangci-lint v2 is currently in work in progress: [vscode-go#3732](https://github.com/golang/vscode-go/issues/3732). - Install the [extension](https://marketplace.visualstudio.com/items?itemName=golang.Go).
Recommended settings ```json -"go.lintTool": "golangci-lint", +"go.lintTool": "golangci-lint-v2", "go.lintFlags": [ "--fast-only" ], From 5becc4d763a0ae91a7e383c762dafcd5f918589a Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Wed, 9 Apr 2025 06:41:53 +0200 Subject: [PATCH 2/5] docs: improve Co-authored-by: logica0419 --- docs/src/docs/welcome/integrations.mdx | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/src/docs/welcome/integrations.mdx b/docs/src/docs/welcome/integrations.mdx index 8298858933c6..e8740a78b129 100644 --- a/docs/src/docs/welcome/integrations.mdx +++ b/docs/src/docs/welcome/integrations.mdx @@ -17,8 +17,10 @@ Install the [extension](https://marketplace.visualstudio.com/items?itemName=gola
Recommended settings +- For those who installed golangci-lint manually + ```json -"go.lintTool": "golangci-lint-v2", +"go.lintTool": "golangci-lint", "go.lintFlags": [ "--fast-only" ], @@ -32,6 +34,25 @@ Install the [extension](https://marketplace.visualstudio.com/items?itemName=gola ] ``` +- For those who want to install golangci-lint via extension + - Install `golangci-lint-v2` via the `Go: Install/Update Tools` command after setting these configs +- This will enable golangci-lint v1 to co-exist with v2 + +```json +"go.lintTool": "golangci-lint-v2", +"go.lintFlags": [ + "--fast-only" +], +"go.formatTool": "custom", +"go.alternateTools": { + "customFormatter": "golangci-lint-v2" +}, +"go.formatFlags": [ + "fmt", + "--stdin" +] +``` + Using it in an editor without `--fast-only` can freeze your editor. Golangci-lint automatically discovers `.golangci.yml` config for edited file: you don't need to configure it in VS Code settings. From 918ecb750287f77d81cd6ae649fa91e84cbc4891 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Wed, 9 Apr 2025 12:15:47 +0200 Subject: [PATCH 3/5] docs: improve render --- docs/src/docs/welcome/integrations.mdx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/src/docs/welcome/integrations.mdx b/docs/src/docs/welcome/integrations.mdx index e8740a78b129..de4e2de14837 100644 --- a/docs/src/docs/welcome/integrations.mdx +++ b/docs/src/docs/welcome/integrations.mdx @@ -17,7 +17,7 @@ Install the [extension](https://marketplace.visualstudio.com/items?itemName=gola
Recommended settings -- For those who installed golangci-lint manually +For those who installed golangci-lint manually: ```json "go.lintTool": "golangci-lint", @@ -34,9 +34,13 @@ Install the [extension](https://marketplace.visualstudio.com/items?itemName=gola ] ``` -- For those who want to install golangci-lint via extension - - Install `golangci-lint-v2` via the `Go: Install/Update Tools` command after setting these configs -- This will enable golangci-lint v1 to co-exist with v2 +Using it in an editor without `--fast-only` can freeze your editor. +Golangci-lint automatically discovers `.golangci.yml` config for edited file: you don't need to configure it in VS Code settings. + +For those who want to install golangci-lint via extension: +- install `golangci-lint-v2` via the `Go: Install/Update Tools` command after setting these configs. + This will enable golangci-lint v1 to co-exist with v2. +- and use the following settings: ```json "go.lintTool": "golangci-lint-v2", From b28686580af393437b13b45a17f747275c5dc880 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Wed, 9 Apr 2025 14:19:53 +0200 Subject: [PATCH 4/5] docs: improve render --- docs/src/docs/welcome/integrations.mdx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/src/docs/welcome/integrations.mdx b/docs/src/docs/welcome/integrations.mdx index de4e2de14837..10dd4a9866ba 100644 --- a/docs/src/docs/welcome/integrations.mdx +++ b/docs/src/docs/welcome/integrations.mdx @@ -15,9 +15,7 @@ Install [plugin](https://plugins.jetbrains.com/plugin/12496-go-linter). Install the [extension](https://marketplace.visualstudio.com/items?itemName=golang.Go).
-Recommended settings - -For those who installed golangci-lint manually: +Recommended settings for those who installed golangci-lint manually ```json "go.lintTool": "golangci-lint", @@ -37,10 +35,14 @@ For those who installed golangci-lint manually: Using it in an editor without `--fast-only` can freeze your editor. Golangci-lint automatically discovers `.golangci.yml` config for edited file: you don't need to configure it in VS Code settings. -For those who want to install golangci-lint via extension: -- install `golangci-lint-v2` via the `Go: Install/Update Tools` command after setting these configs. +
+ +
+Recommended settings for installed golangci-lint via extension + +1. Install `golangci-lint-v2` via the `Go: Install/Update Tools` command after setting these configs. This will enable golangci-lint v1 to co-exist with v2. -- and use the following settings: +2. use the following settings: ```json "go.lintTool": "golangci-lint-v2", From a91b26b929c6aa8b2ff160e2ffb9223ca2cfa938 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Wed, 9 Apr 2025 14:53:02 +0200 Subject: [PATCH 5/5] review --- docs/src/docs/welcome/integrations.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/src/docs/welcome/integrations.mdx b/docs/src/docs/welcome/integrations.mdx index 10dd4a9866ba..11a4889da617 100644 --- a/docs/src/docs/welcome/integrations.mdx +++ b/docs/src/docs/welcome/integrations.mdx @@ -33,16 +33,16 @@ Install the [extension](https://marketplace.visualstudio.com/items?itemName=gola ``` Using it in an editor without `--fast-only` can freeze your editor. -Golangci-lint automatically discovers `.golangci.yml` config for edited file: you don't need to configure it in VS Code settings. +Golangci-lint automatically discovers the `.golangci.yml` config for the edited file, so you don't need to configure it in VS Code settings.
-Recommended settings for installed golangci-lint via extension +Recommended settings for those who installed golangci-lint via extension -1. Install `golangci-lint-v2` via the `Go: Install/Update Tools` command after setting these configs. - This will enable golangci-lint v1 to co-exist with v2. -2. use the following settings: +Install `golangci-lint-v2` via the `Go: Install/Update Tools` command after setting these configs. +This will enable golangci-lint v1 to co-exist with v2. +And use the following settings: ```json "go.lintTool": "golangci-lint-v2", @@ -60,7 +60,7 @@ Golangci-lint automatically discovers `.golangci.yml` config for edited file: yo ``` Using it in an editor without `--fast-only` can freeze your editor. -Golangci-lint automatically discovers `.golangci.yml` config for edited file: you don't need to configure it in VS Code settings. +Golangci-lint automatically discovers the `.golangci.yml` config for the edited file, so you don't need to configure it in VS Code settings.